is the Application class instantiated when a BroadcastReceiver is called? I have some logic in the custom Application class which is needed before the logic in onReceive of a BroadcastReceiver is run. The documentation says the Context argument in the onReceive method is the Context in which the receiver is running. I was not sure if it is the application in which the receiver is defined(statically in the manifest) or not.
is the Application class instantiated when a BroadcastReceiver is called? I have some logic
Share
To answer this question you can try an expriment. Just extends the Application and log it’s class in onReceive() :