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. What's the trick for viewing my location?

I've got my map working in the emulator, I can place various markers and all
that good stuff, but I can't see my location.  All of the code I see says
all I have to do is

        me=new MyLocationOverlay(this, map);

and a blue dot will magically appear on my map.  Well, it doesn't.

I've used DDMS to set the location to a known location.  I've placed a
marker at that location to prove I now what I'm doing.

I've got me.enableCompass and me.enableMyLocation in my onResume.  Oh, and I
don't see the compass, either.

What's the trick?


Faber Fedor
Cloud Computing New Jersey


2. Null Pointer Exception/ Crashing problem

When I try to run the following code My program eather crashes or
throws a null pointer exception in the LogCat.

public class The_Perfect_Tip extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState)

                EditText billAmt = new EditText(this);
                EditText precentage = new EditText(this);
                TextView Ans = new TextView(this);
                double billNum = 0;
                double preNum = 0;

                billNum = Double.parseDouble(((EditText)findViewById

                preNum = Double.parseDouble(((EditText)findViewById

                ((TextView)findViewById(""+billNum * (preNum 


Why is there a null pointer excetpion being thrown?

3. Performance Problem with ListView / Styled TextView

4. Activity callback anomaly

5. Changes to Google's apps?

6. Not a big problem.

7. Unable to reconstruct bitmap from ksop2 response