I want to be able to answer a phone call and hang up the phone call as soon as it starts ringing within my application without having to touch the phone. I have searched but I haven't found much about this. Can some one please help?
Related
Is there an easy way to reject a phone call in my application?
I am writing an application and I want it to reject an incoming phone call automatically.
Is there a way to do it without making the application the default call application?
Thank you.
I am writing a new application and I am a newbie so I don't know exactly where to start.
I already have something that detects the phone call and gives me the calling number. It was easy but I don't know how to reject that call.
Help. and thank you.
I want to make an app that forcibly ends a call by recognizing a specific word when I am on a call.
So, So there are a few questions.
Can the app detect that it is on the phone and end the call if it is on the phone?
Which API should I use?
Is it possible to activate the voice recognition function while on a call?
When I searched, there was a lot of question to hang up the incoming call. But i want to hanu up on a call.
You can use TelephonyManager#getCallState to detect if phone is in call and use TelecomManager#endCall to end active call.
I am making an application to call multiple numbers.
In that app
When I call to 1 person and if the call is answered by the user then the loop should be stopped.
But If the call is rejected then the call should be on next number and loop should be continue.
My problem is I can't detect whether the call is rejected or answered. When I had search on net some people says it is not possible to detect the call is answered or rejected.
Is it really not possible to detect the call in android? If it is possible then how can I do that?
There are many phone states that you can read as follow for incoming phones
http://developer.android.com/reference/android/telephony/TelephonyManager.html
Device states ->
if you answer an incoming call, the phone goes into OFF_HOOK. IDLE
implies that the phone is not doing anything. When a call first comes
in, the state is RINGING until you reject the call (send the phone to
idle) or answer the call (send the phone to OFF_HOOK).
(Android: the three phone states)
Edit: But there's no way to listen states of outgoing calls, maybe you can parse logcat logs or something else but it's impossible as far as i know, but you can try http://developer.android.com/reference/android/telephony/TelephonyManager.html because there's a state named ACTION_PHONE_STATE_CHANGED maybe it can help.
Here's the issue link : issue
i am currently collecting information, if it is possible to make some kind of quickdraw-application for emergency purposes; i want to get the device to start a customized camera-intent once some certain key-combo is pressed.
I have check quite some information on the topic already, but it is still not clear to me how doable this whole idea is.
So far i figured, that it is not meant to be by android-design. My first idea was to build some kind of InputService and make it teach the hard power-button to listen for a triple-click. But the Services arent allowed to catch KeyEvents. So, the volume-button is out of the equasion aswell.
Then i came across the idea reacting on the SCREEN ON/OFF event, but 80% of the ppl say that it is not going to work, while 20% state, that they got it. But im not really sure if they really did it.
Last but not least the question, if it is possible to launch this customized-camera-intent/application out of the locked mode.
resumé: i need to check if its possible in general to launch this camera-app (that does some quick fotos for emergency purposes) while phone is in the pocket in lock-mode. Anybody got some opinion for me? thx
The solution is to setup a BroadcastReceiver that is listening for the SCREEN_ON-Event. I did this one inside a backgroundservice that was waiting for at least two SCREEN_ON-Events within a short period of time. (less than two events obviously can't work)...
The Service then dismissed the Keyguard and was able to even pass past password/gesture and run the App. Funny fact: closing the app does pop back to desktop still beeing logged in.
I did this at Android 4.2.. Sources told me that dismissing the keyguard is not working with current Android-versions no more.
My App sends out GPS data with a timer. Sometimes I block the screen.
Now with some phones and only sometimes I have the problem that the OS somehow blocks the data packages and only releases them later, when the screen is unlocked. The messages still are getting sent from the app but only stopped in android.
Anybody have a Idea why that happens and how I can stop it?
Is it possible that those devices are going to sleep (or sending the radio to sleep)? Have you tried setting a wakelock to prevent this? https://developer.android.com/reference/android/os/PowerManager.WakeLock.html
I suspect your application goes to sleep, or your wifi. There are applications specifically designed to keep your wifi alive, so i suspect it does sleep. Were i to create the wifi, i would definitely make it sleep when there wasnt anything to say.
To test download one of the apps. That and write to a log file when your application is going to sleep.
Sorry i couldnt give a specific answer. Id have posted this as a comment, but im too new to be able to do that.