how to make custom incoming call screen in Android in android kitkat - android

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

Related

Background call receiving in using IMSdroid voip

Thanks in advanced, I am using imsdroid library in my app. calling feature work fine, but i am unable to receive call when app is closed.When I minimize application it works but when i clear application from recent app it can't receive call. What is solution for this issue, please help me out. or provide some reference links.
According to me, IMSdroid does not provide this functionality. You have to open your application while dealing with them. I got same issue:
https://code.google.com/p/imsdroid/issues/detail?can=2&q=491&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Summary&id=491
finally resolved it with some customization.
#nik u r right. it is not possible to keep registered all the time.in that case u have to notify the second person when first client tries to make him a call ,and when second client will get notification, then fire a broadcast to start the NativeService. this will register the device. and finally u will get the incoming call.

Start Android Service on boot time Android 4.0

I'm triying to start a android service in android 4.0 when the device is booting, in boot time, but it's imposible , I had be used many codes, copy and paste. I had used code from here, stackoverflow of others examples and questions , but for me is imposible. I'm using android 4.0.1 in a table Acer Iconia A501. I put my code here. Somebody Can it try this code??? this is the page :This page please, it is easy
You need to register a broadcast receiver for the intent that is broadcast on startup. There is ZERO doubt that this is what you need to do.
See: BroadcastReceiver not receiving BOOT_COMPLETED
You need to do the same. Register a broadcast receiver and first make sure that you are catching the BOOT_COMPLETED event. Then its just a matter of doing a startService.
The problem is most likely in the Manifest. Check that you have exactly the right name for everything. Note the . in names like .MyBroadcastReceiver These are important. Missing just one thing will cause a problem.
Both the Receiver and Service definition must be perfect. Also check logcat and tell us what errors are there.

Programmatic auto attendant on an Android device

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.

How can I detect when a call is answered? [duplicate]

Once ACTION_NEW_OUTGOING_CALL has been broadcasted, I need to capture the following event of the other party answer. Could you advice on how to achieve that please? I know it is possible as the Android dialer app changes the green Android icon to the person's photo exactly when they pick up.
UPDATED: I've had a look at the source of the app on Android handling the outgoing calls. I noticed the following method in ContactsUtils:
/**
* Kick off an intent to initiate a call.
*/
public static void initiateCall(Context context, CharSequence
phoneNumber) {
Intent intent = new Intent(Intent.ACTION_CALL_PRIVILEGED,
Uri.fromParts("tel", phoneNumber.toString(), null));
context.startActivity(intent); }
I guess my answer is in the activity listening for Intent.ACTION_CALL_PRIVILEGED. So to rephrase my question: Does anyone know which activity handles Intent.ACTION_CALL_PRIVILEGED?
I don't think there's such API and also there's no API for sending DTMFs due to the same reason that you can't tell when the call is being connected.
It does not necessarily needs to be possible to capture this as an outside app. The green android icon is a part of the application that controls the call, so it does not need a broadcast to change the icon.
As far as android's telephony manager is concerned u cannot detect programmatically whether the call has been answered or not. This is to say that u do not have the option to know when the user picked the phone at other end.
Android has got 3 states of telephony manager and none of them are capable of detecting whether the call was actually answerd or not(IN CASE OF OUTGOING CALLS)
The only way you may be able to do this is by parsing the Logcat logs, no PhoneStateListener event is available for that.
Some are asking for it here: https://code.google.com/p/android/issues/detail?id=14266
Anyway, in versions above Android 4.2 as Logcat is "sandboxed" it may be impossible...

Get event on launching the native application

1 . can we get any event when user tap/touch native application(i.e. messaging,contacts).
2 . i know that any application launch by intent in android, there is any way to know which application launch with launch of application.
Thanks
No, We can not get any event directly or by any receiver.
what I have figured it that it can not be done directly......
But there are two work around for this :
Start a service that will check top-activity always by this way can know what activity got launched and do whatever you do under this condition.
Catch the logcat, read the line, and you can easily get what event what even took place, and by using your required filters you can even do whatever you like :)
can we get any event when user
tap/touch native application(i.e.
messaging,contacts).
Not generally. Most of these icons are tied to their applications.
there is any way to know which application launch with launch of application.
This makes no sense to me, sorry.
I am agree with #K_Rapid's answer..
Check code of AppLocker
I hope you will got solution from that code...
For (1): what do you mean by 'tap/touch'? Do you mean when the built-in applications are launched, or when they're interacted with?
If you mean launching, you can listen to any intents being fired by the system by registering a broadcast receiver. If you set your IntentFilter to receive intents with CATEGORY_LAUNCHER, you should be able to see when the launcher starts applications.
See:
http://developer.android.com/reference/android/content/Intent.html#CATEGORY_LAUNCHER
http://developer.android.com/reference/android/content/BroadcastReceiver.html
If you mean interacting, I don't think you can do that.
For (2): I don't believe that intents remember where they were constructed, so I don't think this is possible. I could be wrong, however.

Categories

Resources