Note that there are some explanatory texts on larger screens.

plurals
  1. POService doesn't run Repeating alarm at boot time
    primarykey
    data
    text
    <p>I want to run a repeating alarm, starting at system boot. This is the code:</p> <pre><code>// Run the SendService once an hour @Override public void onReceive(Context context, Intent intent) { //Logger.getInstance().writeLine(getClass().getName(), "Received boot, start SMS repeating alarm"); Toast.makeText(context, "Starting SMS2Mail alarm on boot", Toast.LENGTH_LONG).show(); Intent svcIntent = new Intent(context, MessageFileService.class); svcIntent.setAction(MessageFileService.GET_INTENT); sendSMSIntent = PendingIntent.getBroadcast(context, 0, svcIntent, 0); alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, AlarmManager.INTERVAL_FIFTEEN_MINUTES, AlarmManager.INTERVAL_HOUR, sendSMSIntent); } </code></pre> <p>The manifest has</p> <pre><code>&lt;uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /&gt; </code></pre> <p>and</p> <pre><code> &lt;service android:name="com.cio1.sms2mail.StartSendService" android:enabled="true" android:exported="true" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.BOOT_COMPLETED" /&gt; &lt;/intent-filter&gt; &lt;/service&gt; </code></pre> <p>The AlarmManager does not fire at all, as far as any of my debugging resources can tell me. Also, any clues as to how to recover the LogCat information from boot time would help. Also, does this have to do with the restriction on broadcast receivers mentioned <a href="https://stackoverflow.com/questions/11640800/start-android-service-4-0-boot-time">here</a>? Thanks.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload