You do not hold the RECEIVE_BOOT_COMPLETED permission. Instead, you are trying to hold the RECEVIE_BOOT_COMPLETED permission, which does not exist.
On Fri, Mar 8, 2013 at 11:12 AM, pawpaw17 <[email protected]> wrote: > Here is most of my manifest file. I changed things around so I'm trying to > get .MyBootAlarmReceiver to get called both when boot completes and when the > SD card is finished loading, but my onReceive() method doesn't seem to be > getting called. Any ideas? > > I suspect some simple goofup: > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="x.x.x" > android:installLocation="auto" > android:versionCode="1" > android:versionName="1.0.0" > > > <supports-screens > android:anyDensity="false" > android:largeScreens="true" > android:normalScreens="true" > android:smallScreens="true" /> > > <uses-permission android:name="android.permission.WAKE_LOCK" /> > <uses-permission android:name="android.permission.INTERNET" /> > <uses-permission android:name="android.permission.BOOT_COMPLETED" /> > <uses-permission > android:name="android.permission.RECEVIE_BOOT_COMPLETED" /> > <uses-permission > android:name="android.permission.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE" /> > > <application > android:icon="@drawable/iconmain" > android:label="@string/app_name" > > <uses-library android:name="com.google.android.maps" /> > > <activity > android:name=".Landing" > android:label="@string/app_name" > android:screenOrientation="portrait" > android:theme="@android:style/Theme.NoTitleBar" > > <intent-filter> > <action android:name="android.intent.action.MAIN" /> > > <category android:name="android.intent.category.LAUNCHER" /> > </intent-filter> > </activity> > <activity > android:name=".Products" > android:label="@string/prod_name" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </activity> > <activity > android:name=".SpecialEvents" > android:label="@string/specialevents" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </activity> > <activity > android:name=".Calories" > android:label="@string/cal_list" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </activity> > <activity > android:name=".coupon" > android:label="@string/coupon" > android:theme="@android:style/Theme.NoTitleBar" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </activity> > > <receiver > android:name=".MyAlarmReceiver" > android:label="Notifications" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </receiver> > <receiver > android:name=".MyBootAlarmReceiver" > android:enabled="true" > android:exported="true" > android:label="Notifications" > > <intent-filter> > <action android:name="android.intent.action.BOOT_COMPLETED" > /> > <action > android:name="android.intent.action.ACTION_EXTERNAL_APPLICATIONS_AVAILABLE" > /> > </intent-filter> > </receiver> > > <activity > android:name=".BrowseByType" > android:label="@string/BrowseByType" > > <intent-filter> > <action android:name="android.intent.action.ALTERNATIVE" /> > > <category android:name="android.intent.category.ALTERNATIVE" > /> > </intent-filter> > </activity> > > </application> > > <uses-sdk > android:minSdkVersion="3" > android:targetSdkVersion="14" > > </uses-sdk> > > </manifest> > > my class > > public class MyBootAlarmReceiver extends BroadcastReceiver { > > > @Override > public void onReceive(Context context, Intent intent) { > > try{ > Log.w("DEBUG", "got the receiver"); > Intent launchIntent = new Intent(context, MyAlarmReceiver.class); > PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, > launchIntent, 0); > > AlarmManager alarmManager = (AlarmManager) > context.getSystemService(context.ALARM_SERVICE); > long interval = 86400000; // the interval is one day > long firstTime = 0; > > // create a Calendar object to set the real time at which the alarm > // should go off > Calendar alarmTime = Calendar.getInstance(); > Calendar now = Calendar.getInstance(); > > > alarmTime.setTimeInMillis(now.getTimeInMillis() + 10000); > firstTime = alarmTime.getTimeInMillis(); > > > // Repeat every day at 5pm > alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, firstTime, interval, > pendingIntent); > } > catch(Exception e){ > } > > } > > }; > > -- > -- > 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 > --- > You received this message because you are subscribed to the Google Groups > "Android Developers" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _The Busy Coder's Guide to Android Development_ Version 4.6 Available! -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

