android - Stop an app by calling the lifecycle callbacks -


how can stop whole app in simple terms? (all activities, services, threads, etc. everything) life-cycle callbacks (especially onstop() , ondestroy()) should called.

google suggests following possible solution:

  • kill process: wouldn't call lifecycle callbacks
  • and finish(); 1 activity:

but possible access method outside like:

//getting activityies, how? //for each gotten activity acitvityname.finish(); or via or via getparent().finish(); ? 

this did not me: best way quit android app?

fd

use broadcast receiver call activities , call finish locally in them, invoking current lifecycle callbacks.

broadcastreceiver , paused activity

http://developer.android.com/reference/android/content/broadcastreceiver.html


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -