Changing default dialer tones - android

I am creating an android app in which I am trying to modify the default dialer keyboard tones (1,2,3....) (NOT the incoming caller tunes etc)
This is my first approach for such kind of android app.
Can anyone please guide me how to achieve this?
I read it somewhere that "ToneGenerator" class can be used to achieve what I've in mind but not sure how to use this class.
A little help here will be highly appreciated.
Thnx..

Use below code to generate tone.
ToneGenerator generator = new ToneGenerator(AudioManager.STREAM_MUSIC,100);
generator.startTone(ToneGenerator.TONE_DTMF_0);
Thread.sleep(500);
generator.stopTone();
generator.release();
Change TONE_DTMF_0 according to your needs

Related

Android AudioRecorder with UI

I want to create an audio recorder I have tried the code I get from http://developer.android.com/guide/topics/media/audio-capture.html and it works fine; it records and it plays back what I have said. But right now I want to create an audio recorder with a UI like in recognizerIntent which Google has provided so that you can see or monitor that your voice has been recorded(sorry I can't find a right term but I'm hoping you can understand what I am trying to say). Do you know any tutorial or links that can help me?thanks for you help!
I think you mean that you want some feedback that your voice is being picked up? If so, perhaps this project, Audalyzer might be a good place to start looking?
Libraries within the package offer you a dB reading, a one and two-dimensional wave form, and an FFT plot.
(source: googlecode.com)
There is a simpler WaveformControl you may find easier to understand and modify for your needs.

Android Continuous Speech recognition? [duplicate]

I googled around and found the regular speech-api from google. But I think this isn't what I need. I need continious voice recognition and the ability to launch other actions when a specific word is spoken. Is there anything in the android sdk that I can use?
If not: Is it possible to implement third-party libraries? (If yes: which - and what do I have to think about when implement a third-party-library?)
Edit: I thought about this again. I have to recognize just one 'word' (that probably won't be in googles-speech-databases). I have the chance to record it. That means, I'm able to continiously match the incoming audio-stream against my recording. That should work without a database. But I'm new to android-development. Do you have suggestions for APIs to use for recording and matching the recorded? Or is there any better way to continiously wait for a specifig 'word' to occur and then process any further actions?
btw: if that wasn't clear described: the app should continue to record and watch for the word to occure again when the reaction is done.
Is there anything in the android sdk that I can use?
No, sorry.

Continuous Speechrecognition in Android

I googled around and found the regular speech-api from google. But I think this isn't what I need. I need continious voice recognition and the ability to launch other actions when a specific word is spoken. Is there anything in the android sdk that I can use?
If not: Is it possible to implement third-party libraries? (If yes: which - and what do I have to think about when implement a third-party-library?)
Edit: I thought about this again. I have to recognize just one 'word' (that probably won't be in googles-speech-databases). I have the chance to record it. That means, I'm able to continiously match the incoming audio-stream against my recording. That should work without a database. But I'm new to android-development. Do you have suggestions for APIs to use for recording and matching the recorded? Or is there any better way to continiously wait for a specifig 'word' to occur and then process any further actions?
btw: if that wasn't clear described: the app should continue to record and watch for the word to occure again when the reaction is done.
Is there anything in the android sdk that I can use?
No, sorry.

Android: Continually Listen in Background for Camera Taking Photo

I'm very new to Android development (think started yesterday) and in my application I'm trying to listen for when the camera is used to take a picture. Also, I need to listen for this action all the time such that my application can "close", but it'll still be listening in the background for when the camera takes an image (my application will execute almost entirely in the background once it's setup initially). Anyway, I've been doing a ton of reading and searching online and such and I've found that the best way, probably, to do this is to use a BroadcastReceiver, but what I've not seen is a good example of setting something like this up. I'm actually just very confused how to set up the BroadcastReceiver and how to start it working. Could someone provide me with a good example of how this should be done? Has anyone ever used something like this to listen for the camera taking a picture? Will this method work for me even if the application is "closed"?
Thanks in advance for any help you can provide!
Check this article out. It explains usage of the different available sensors their listeners and how to tap into them. It isn't explicitly giving you code for you camera but should be enough to jump start your progress provided you know the basics.

Uplink DTMF tone generation

Is there any way I can dynamically generate uplink DTMF tone (ie the receiver hears it)?
When I looked at the android source code I saw a function called startDTMF() which is exactly what I need, but I couldn't find any API that allows me to access that function...
I then thought of using ToneGenerator and tried to inject the sound to the mic stream, and again I couldn't find a way to achieve this...
Any help is appreciated.
Perhaps the android.media.ToneGenerator class in the SDK can help?
tel:1234,123
this can help.
, generates a 4 sec delay so you may use this at places sometimes...
but still we need to get some thing from sdk lets hope Android guys find something up!

Categories

Resources