java - onResume in android Service -
in application have service creates threads. when device goes in sleep mode, threads interrupted , destroyed. assuming cannot use activity's onresume() (because using standout library , standoutwindow extends service), how can recreate/restart threads when wake device?
would catching screen on/off intents idea?
system suspend should not destroy thread, put thread suspend. thread should not running, if need finish job, grasp weak lock.
you can register runtime broadcast receiver watch screen on/off state handle it. normal approach.
Comments
Post a Comment