Receive broadcast even when app is not running

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Receive broadcast even when app is not running

Mushahid Gillani
Problem: My application is listening for broadcast ACTION_APPLICATION_RESTRICTIONS_CHANGED, this action start to receive when i launch the application for the first time after app is installed
Note: Broadcast is registered explicitly in the background service and app is signed with platform keys

Questions: 
1: How can i receive the broadcast even if i do not launch the app for the first time?
2: What changes i requires in the AOSP to make it work ?

Thanks!!

Regards,
Mushahid

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/07327471-1e43-4c42-b8ec-0142327b42f3n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Receive broadcast even when app is not running

Kushtrim Pacaj
You need to find that broadcast where it is sent, and add FLAG_RECEIVER_INCLUDE_BACKGROUND and FLAG_INCLUDE_STOPPED_PACKAGES flags to it.
It will cause
On Monday, October 12, 2020 at 5:18:13 PM UTC+2 [hidden email] wrote:
Problem: My application is listening for broadcast ACTION_APPLICATION_RESTRICTIONS_CHANGED, this action start to receive when i launch the application for the first time after app is installed
Note: Broadcast is registered explicitly in the background service and app is signed with platform keys

Questions: 
1: How can i receive the broadcast even if i do not launch the app for the first time?
2: What changes i requires in the AOSP to make it work ?

Thanks!!

Regards,
Mushahid

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-platform/6ed033c7-325c-4a24-9906-c661ddb50ff3n%40googlegroups.com.