-2

Is it possible to create an android application which is purely a background service? There is no need of any icon launcher, layout, etc.If yes, is it possible to do this using eclipse?

I just need a Broadcast Listener to listen to my incoming messages and perform some sound and vibration activity.

newbee
  • 409
  • 2
  • 12
  • 34

2 Answers2

1

There is no need of any icon launcher, layout, etc.

Yes, there is.

I just need a Broadcast Listener to listen to my incoming messages and perform some sound and vibration activity.

First, on Android 3.1, any such BroadcastReceiver that you register will be blocked from receiving broadcasts until the user launches one of your activities. Hence, you need an activity, and for the user to be able to start it -- otherwise, your app will never run.

Second, unless you are a malware author, you need an UI for:

  • The user to configure the behavior of your background processing

  • Showing online help and support contact information

  • Displaying your license agreement, copyright notice, attributions, etc.

So, yes, you need an "icon launcher, layout, etc.".

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
0

you can create an application which will work only in background. create an application with a broadcast receiver. Declare it in manifest. And like usual application dont use

<category android:name="android.intent.category.LAUNCHER" />
stinepike
  • 54,068
  • 14
  • 92
  • 112