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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -