Search code examples
androidbroadcastreceiver

My app only has a broadcast receiver. Will it work on all versions of android?


I have developed an app which only has a BroadcastReceiver (no Activity + no Service) - its for a specific purpose.

I was able to test my app on v2.3.3 and it works perfectly well. Will it work the same on all platforms or there are exceptions to this? If there are - what could be alternative(s)?


Solution

  • No, it will not work on all versions.

    Starting Android 3.1 (API 12), you cannot receive broadcasts until a UI component of your app (an Activity) has been manually opened by the user at least once.