I am developing a system app in which I need to capture the outgoing call answer/reject events. Could you advice on how to achieve this in a rooted device please ? Problem with TelephonyManager class is that there is no notification of when outgoing call has answered.
This is crucial to my app. My target device is android 4.4(kitkat).
Some thing like this app.
https://play.google.com/store/apps/details?id=io.github.yutouji0917.callvibrator.ad
To do this you must register broadcast receiver for listening phone events like incoming, outgoing call, hang up events and don't forget to define broadcast in manifest file.
Here i am attaching a link that will help you to implement your code
http://karanbalkar.com/2014/02/detect-incoming-call-and-call-hangup-event-in-android/
http://www.codeproject.com/Articles/548416/Detecting-incoming-and-outgoing-phone-calls-on-And
Related
As we all know Broadcast receiver is not working anymore, kindly suggest me a better way to get this done.
Reccelly, I had used firebase to listen to event call incomming. Android system don't kill firebase service when it run in background. Now, I only know this way.
I have an idea for an android NFC application but am not entirely sure how to implement it.
I want to be able to have an application that is always on (starts on bootup) and the user cannot exit out of the application. I want two have two phones with NFC enabled. One phone is set up as a listener, the other phone is set up as a sender. Both of these devices will have a code. Sender inputs a code (1234), and the listener has a code (123). If the sender puts the phone up to the listener, and the code is incorrect (1234 instead of 123). The device will lock. The only way the device can unlock is if the sender has the same code as the listener.
I don't want code samples.. I just want an explanation of how you would go about doing this.. and if it is possible.
Basically you need your app to start a service after the phone has booted, use BroadCastReceiver which takes action with the BOOT_COMPLETED intent. When that broadcast receiver has been notified of the boot completion you'll start the service which will handle your nfc jobs.
which api detects first incoming call in android phone can anyone tell me or the first action comes into play by which api and where it happens when incoming call comes
Learn about Broadcast and BroadcastReceiver (Abstract Class) to get broadcasts about incoming calls, sms, mms, wifi etc.
http://developer.android.com/reference/android/content/BroadcastReceiver.html
I'm trying to develop small app that will be registered on PhoneStateListener and do some magic over incoming voice calls. For debugging purposes I need to trigger onCallStateChanged(...) event from outside of phone, not perform real incoming voicecall.
Is it possible to do this somehow with sending phone number to debugged app?
There you go try these guy over here http://www.anddev.org/video-tut_-_simulating_incoming_phone_calls_-_sms_via_cmd-t135.html
Hope it helps :D
In my android application, I'm looking for a particular bluetooth device. When I found a bluetooth device, I check if it's the one I'm looking for and if it is, I call cancelDiscovery();
My question is : If I cancel the discovery, will I still receive the ACTION_DISCOVERY_FINISHED broadcast or not ?
Thank you !
Yes, as soon as you cancel the discovery ACTION_DISCOVERY_FINISHED broadcast will receive it.