android - How to hide activities -


i have 2 activities. first activity running in foreground. while pressing home button, first activity goes background , calls service there second activity started using intent. first activity shown on top. want hide both of activities in background.

starting second activity:

 intent intent1 = new intent(xxx.this,yyy.class);  intent1.addflags(intent.flag_activity_clear_top);  intent1.addflags(intent.flag_activity_new_task);  startactivity(intent1); 

use service send intent second activity special value extra, override onnewintent , check see if value present; if there should stop activity use finish() function end activity(as can use movetasktoback(true) hide activity). highly recommend read this question.


Comments

Popular posts from this blog

php - get table cell data from and place a copy in another table -

javascript - Mootools wait with Fx.Morph start -

php - Navigate throught databse rows -