Android : How to hide the Activity without using finish -


i'am calling activity broadcastreceiver. when phone ringing show activty. problem when use application if call means current activity not hiding.

so cannot see calling screen , cannot pick call. whatever activity have opened, want hide when call coming , again want show same activity.

before have used finish method in onreceive method. if use next time not calling broadcastreceiver.

instead of code can write hide activities.

@override public void onreceive(context context, intent intent) {     loginactivity.context.finish();     mainativity.context.finish();     projectactivity.context.finish();     telephonyregister(context,intent);  } 

try in activity.

  @override public boolean onkeydown(int keycode, keyevent event) {     if (keycode == keyevent.keycode_back) {         movetasktoback(true);         return true;     }     return super.onkeydown(keycode, event); } 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -