I want to intercept incoming call in android.
One way is to extend "BroadcastReceiver". Is there any other way?
Also, does "BroadcastReceiver" works on all andorid versions? See this link - How to intercept incoming calls android 2.3.x
Yes Broadcast Receiver works in all versions. Please refer http://developer.android.com/reference/android/content/BroadcastReceiver.html. It is available since version 1 (i.e. from the start of Android).
I used PhoneStateListener (http://developer.android.com/reference/android/telephony/PhoneStateListener.html) . It is also available since version 1.
Related
Is there is api where i can record all the incoming and outgoing call in android pie version . It seems nearly impossible to record a call. Please suggest what can be done in this scenario
Android disabled the api with their security update policy. Looking at the permissions list the closest you can find is the MANAGE_OWN_CALLS, meaning that the best solution for you is to implement a standalone application for calling where you should be able to interact with microphone directly.
I tried many ways , but didn't work on kitkat or lollipop
I need broadcast receiver with code that can answer the call by a button , please
Sadly, you can't answer the call. This is a system permission that you can't acquire.
It is system permission and you shouldn't do it, but I found nice solution to this. You can use Intent.ACTION_MEDIA_BUTTON and send it once to answer a call and send it twice to reject it.
Android emulate/send ACTION_MEDIA_BUTTON intent
Is it possible to create an Android application that automatically attend incoming calls to an Android phone? If so, which APIs may be used to achieve this (a piece of code snippet highly appreciable)?
If the programmatic auto attendant feature not possible, why the Android OS imposes this restriction?
Is iOS behaves as same as Android in this scenario, please explain.
While googling I found something that can be useful. I haven't tried yet still I think this will help have a look at Call Control in Android
You can listen incomming call intent by implementing broadcast receiver Intent.CALL_STATE_CHANGED to listen for incoming call, but answering incomming call automatically seems not feasible.coz android application dont have access to incomming call audio stream.
I want to use C2DM in my android application. I am using code schemas shown in official tutorials. Everything seems to work fine, but I have problem with handling registration properly.
There are 2 methods in C2DMMessaging class which I have to use: firstly register() and next getRegistrationID(). If I use them sequentially, I get null form the getRegistrationID(). The problem is registration is asynchronous. In my application in the beginning I need to know the regidtrationId, I can start the rest of the app only after I get it.
I tried to do some synchronization using monitors (i.e. wait() in register method and notify() in C2DMReceiver.onRegistered()), but it didn't work (the code of onRegistered() hasn't been reached, after calling wait() in register()).
In other words what I need is making registration synchronous, so I could continue, only after I get registrationId. What is the right way to do it?
Make sure you are following below guidelines:
To develop and test on the Android Emulator, you need to download the Android 2.2 version of the Google APIs Add-On into your SDK.
Make sure you set android:minSdkVersion="8" in the manifest.
Make sure you have at least one Google account synced on your emulator or device.
I'm devlopping a SIP application and whant to launch the normal incoming call interface when having an incoming call from a SIP client. Is that possible ?
Thank you very much.
I am sorry, but it looks like there is nothing as standard incoming call interface in Android (at least not until API level 10).
The screen that you see on incoming call is part of the native PhoneApp. More specifically, it is handled by the class InCallScreen.java from the dialer source code. That Activity has no Intent filters defined, so definitely it is not intended for external usage.
However, some applications may mimic native screens (or copy complete layout, not sure if license allows that), so it looks like it is from native, although in fact it is not.
I checked the source of default phone app, and I figured the only way to get this done is draw a layout exactly like the default incoming call interface -_-||
If you have the solution , please tell me , thank you so much !