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:

  1. is true? confirmed, if terminate app settings->applications --> force stop application wont receive broadcast.
  2. 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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -