I'am just calling an Activity from the BroadCastReceiver. So when the phone is Ringing
it will show the Activty. My problem is when I use my application then if i get a call means then the current Activity is not hiding.
So I cannot see the calling screen and I cannot pick the call. Whatever the activity I have opened, Just I want to hide when the call is coming and again I want to show the same Activity.
Before that I have used finish method in the onReceive method. But if I use that then next time it is not calling the BroadCastReceiver.
Instead of this code what I can write to hide all my Activities.
@Override
public void onReceive(Context context, Intent intent) {
LoginActivity.context.finish();
MainAtivity.context.finish();
ProjectActivity.context.finish();
telephonyRegister(context,intent);
}
0 comments:
Post a Comment