I want to display my own application alongwith Accept/Reject options coming on incoming call on android ..
In one of the existing application 'PhonePlusCallBack' developers are doing the same thing.
I am able to track the phonestate with Broadcast Receiver code looks like this
public class ServiceReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
String state = bundle.getString(TelephonyManager.EXTRA_STATE);
if(state.equalsIgnoreCase(TelephonyManager.EXTRA_STATE_RINGING))
{
String phonenumber = bundle.getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
final Intent newIntent = new Intent(context, GreetAppLauncher.class);
newIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(newIntent);
}
Here i am starting new activity on incoming call But the application is not displayed on homescreen.
Kindly tell me the solution asap
Thanks in advance
