android - WhatsApp background running system -
i interested know how whatsapp runs in android background system after cleaning ram cleaner. made android app in started service , broadcast receiver when cleaned using ram cleaner, both got stopped. push notifications not received when app not running in background. so, wanted know how whatsapp manages this. giving example whatsapp because found system amusing.
if return start_sticky
onstartcommand()
, system automatically restart service once determines not resource strained. means restart if have killed using app killer.
@override public int onstartcommand(intent intent, int flags, int startid) { return start_sticky; }
http://developer.android.com/reference/android/app/service.html#start_sticky
Comments
Post a Comment