broadcastreceiver - Android receiver cannot always get broadcast correctly -
i have package added receiver in android application, , has been distributed couple months.
recently found not package_added broadcasts can received receiver.
looked while, said if app had been killed users or system, no longer broadcasts.
my questions are:
- is true? confirmed, if terminate app settings->applications --> force stop application wont receive broadcast.
- how can prevent happening, or there work around?
1.yes true.
2.take @ wakefulbroadcastreceiver
wake when receives intent. make sure spawn eg. intentservice
process work in background.
take @ commonsware's wakefulintentservice
implementation example.
Comments
Post a Comment