3

I have developed a Service for Android that starts when BOOT_COMPLETED is received.It works fine on versions prior to 3.1.

I newer versions tough I understand the application must be launched in order to receive this broadcast . How can I launch my application if I don't have an User Interface ?

opc0de
  • 11,557
  • 14
  • 94
  • 187

1 Answers1

2

You add a user interface, in the form of an activity that the user can launch. Besides, this is where you need to:

  • Allow the user to stop and start your service, since the user may not want your service to be running 24x7 and you do not want the user to have to resort to Force Close

  • Display your documentation

  • Display your license agreement

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Do you know whether this only applies to third-party apps or also to system apps signed with the platform key (without any other modifications, just the android.intent.action.BOOT_COMPLETED intent filter)? Thanks. – Mathias Conradt Jun 21 '12 at 04:26
  • @MathiasLin: I would presume that there's some process to "whitelist" firmware apps. Whether that is automatic by the apps being in `/system/app/` (or the equivalent) or whether it requires manually tweaking an entry in a database somewhere, I can't say. – CommonsWare Jun 21 '12 at 10:33