hi
try this in your on receive method
if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED))
{
//print some thing here than u will get if it is coming in on
receive method or not
}
nimi
On Thu, Oct 14, 2010 at 10:52 AM, oracleicom <[email protected]>wrote:
> I am unable to get my BroadcastReceiver onReceive method called using
> the BOOT_COMPLETED intent.
>
> -- AndroidManifest.xml --
> <application android:icon="@drawable/icon" android:label="@string/
> app_name"
> android:theme="@android:style/Theme.NoTitleBar">
> <activity android:name=".activities.Umbrella"
> android:screenOrientation="portrait">
> <intent-filter>
> <action android:name="android.intent.action.MAIN" />
> <category
> android:name="android.intent.category.LAUNCHER" />
> </intent-filter>
> </activity>
> <activity android:name=".activities.Preferences"
> android:label="@string/app_name" android:screenOrientation="portrait" /
> >
> <receiver
> android:name="com.jerrellmardis.umbrella.receiver.WeatherStartupReceiver">
> <intent-filter>
> <action
> android:name="android.intent.action.BOOT_COMPLETED" /
> >
> </intent-filter>
> </receiver>
> <service android:name=".service.WeatherUpdateService">
> <intent-filter>
> <action
> android:name="com.jerrellmardis.umbrella.service.WeatherUpdateService" /
> >
> </intent-filter>
> </service>
> </application>
> <uses-sdk android:minSdkVersion="3" />
> <uses-permission android:name="android.permission.INTERNET" />
> <uses-permission
> android:name="android.permission.ACCESS_NETWORK_STATE" />
> <uses-permission android:name="android.permission.READ_PHONE_STATE"
> /
> >
> <uses-permission
> android:name="android.permission.ACCESS_COARSE_LOCATION" />
> <uses-permission android:name="android.permission.VIBRATE" />
> <uses-permission
> android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
>
> -- WeatherStartupReceiver.java --
> package com.jerrellmardis.umbrella.receiver;
>
> import android.app.Notification;
> import android.app.NotificationManager;
> import android.app.PendingIntent;
> import android.content.BroadcastReceiver;
> import android.content.Context;
> import android.content.Intent;
> import android.provider.Contacts.People;
> import android.util.Log;
>
> import com.jerrellmardis.umbrella.R;
>
> public class WeatherStartupReceiver extends BroadcastReceiver {
>
> private NotificationManager mNotificationManager;
> private int SIMPLE_NOTFICATION_ID;
>
> @Override
> public void onReceive(Context context, Intent intent) {
> // Do something interesting here...
> }
> }
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
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