why don't work RECEIVE_BOOT_COMPLETED in emulator?


// AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="mint.TestService2"
      android:versionCode="1"
      android:versionName="1.0">

        <uses-permission
android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

        <receiver android:name=".MyReceiver"
        android:enabled="true">
                <intent-filter>
                        <action 
android:name="android.intent.action.BOOT_COMPLETED" />
                        <category 
android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
        </receiver>
</manifest>




// MyReceiver.java
package mint.TestService2;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;


public class MyReceiver extends BroadcastReceiver
{
        private static  final String TAG  = "===============";

        @Override
        public void onReceive(Context context, Intent intent)
        {
                Log.e(TAG , "**************************");
                Log.e(TAG,  "**************************");
                Log.e(TAG,  "**************************");
        }
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to