Android Lifecycle - how to ensure that one method is always called? -
what must in order ensure app initialised, if user or os kills it?
public static void init(){/*some init , checks here*/} if myalarmreceiver.onreceive() or mybroadcastreceiver.onreceive() called os... how automatically call init() without putting first statement in myalarmreceiver.onreceive(), mybroadcastreceiver.onreceive(), etc?
create class extends application , put statement in oncreate method ref: https://developer.android.com/reference/android/app/application.html#oncreate()
Comments
Post a Comment