Is there any way to make Android emit a sound of arbitrary frequency (meaning, I don\'t want to have pre-recorded sound files)?
I\'ve looked around and ToneGenerator
see this helpful library
https://github.com/karlotoy/perfectTune
it's easy to use
add this to your dependencies
compile 'com.github.karlotoy:perfectTune:1.0.2'
And you use it like this:
PerfectTune perfectTune = new PerfectTune();
perfectTune.setTuneFreq(desire_freq);
perfectTune.playTune();
to stop the tune:
perfectTune.stopTune();