Coder Social home page Coder Social logo

Comments (4)

kaputnikGo avatar kaputnikGo commented on July 28, 2024

Interesting idea.
However, I'm not keen on giving the Passive Jammer the ability to record any audio to file at all.

Currently the jammer works by creating a valid AudioRecord object that has its audio input source set to DEFAULT. The physical microphone that DEFAULT points to is determined by the OS. Tests on a device running LineageOS AOSP shows that the moment a headset is plugged in the DEFAULT input source is internally switched to the headset mic, as is expected. Tests also show that the jammer will block which ever input is routed at the time of starting the passive jamming.

And this is a problem because hotplugging a headset in or out after the passive jammer is running will currently not auto switch the hardware buffer and therefore not block that new input source. A manual Passive restart is required.

An AudioManager method was used in earlier versions of the jammer app but the method(s) have been deprecated and proved unreliable across the 1700 device types currently listed as being supported on Google Play. Quote the Android API docs: "This is not a valid indication that audio playback is actually over the wired headset as audio routing depends on other conditions."

Presently the minimum API for this app is 18 and the newer methods are targeting API 21+ but the better class is only in 23+ (AudioDeviceInfo) which will return an int for what seems like every audio device type (including USB).

I will be looking into this including the min API bump.

from pilfershushjammer.

kaputnikGo avatar kaputnikGo commented on July 28, 2024

included a headphone listener to restart jammer if audio routing changed.

from pilfershushjammer.

davidhedlund avatar davidhedlund commented on July 28, 2024

included a headphone listener to restart jammer if audio routing changed.

Thanks a lot! Can you please add the commit here?

from pilfershushjammer.

kaputnikGo avatar kaputnikGo commented on July 28, 2024

5 march added headset receiver. warning i have had mixed results with this API...
90038f1#diff-c91bf661cf17875bfb846d2f278414f9

from pilfershushjammer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.