am trying to start my service on device boot up.

by Wojciech Topolski » Wed, 21 Jul 2010 18:05:08 GMT

Sponsored Links

Below is my code. Maybe you find something interesting...

*manifest file:::*
<receiver android:enabled="true"
<action android:name="android.intent.action.BOOT_COMPLETED"

<service android:name=".service.MonitoringService">
<action android:name=""

*Broadcast reciever*:::

public void onReceive(Context context, Intent intent) {
// Start service.
Intent serviceIntent = new Intent(context,
serviceIntent.putExtra(something, something);

But remember! If you deploy app on running emulator don't expect to see your
"BootCompletedBroadcastReceiver" in action. First: deploy your app. Second:
close emulator. Third: run emulator with command: emulator -avd

2010/7/21 A N K ! T <>


am trying to start my service on device boot up.

by mac-systems » Wed, 21 Jul 2010 19:10:45 GMT


                android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

To you Manifest


Sponsored Links

Other Threads

1. Do you have android projects for beginner

New to Android development? Start here. Open to any discussion around
beginner's questions; this is a great way to get up and running with
your new App on ...

Click the bellow link to continue€€€€.




2. how to check if another application has been started

Hey guys, I'm trying to create an application where I need to check if
an application has been started. So for example, if the calendar was
clicked, before the calendar came up, my application would start up.
Is there any way to do this?


3. Managing view's refresh delay and soft keyboard

4. Dialo

5. Problem running HelloWorld (or anny sample application)

6. ADT Plugin for Eclipse Source Code

7. How to add a keyboard localisation