Skip to content
This repository has been archived by the owner on Sep 2, 2019. It is now read-only.

Scope #7

Closed
garudaonekh opened this issue Oct 19, 2016 · 3 comments
Closed

Scope #7

garudaonekh opened this issue Oct 19, 2016 · 3 comments
Labels

Comments

@garudaonekh
Copy link

garudaonekh commented Oct 19, 2016

Hi,
If I I use initialize the monitor in an activity using broadcastreceiver( init in manifest), will the broadcast be still fired when the activity is destroyed?

And what if I use Application as context?

Thanks;

@gotev gotev added the question label Oct 19, 2016
@gotev
Copy link
Owner

gotev commented Oct 19, 2016

will the broadcast be still fired when the activity is destroyed?

no, as per Android activity lifecycle

And what if I use Application as context?

In that case you should not do that and implement it as a global broadcast receiver and register it in your manifest

@gotev gotev closed this as completed Oct 19, 2016
@garudaonekh
Copy link
Author

Why I should not use Application as context?

@gotev
Copy link
Owner

gotev commented Oct 20, 2016

Because if you need the application context it means you need a global broadcast receiver

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants