Hi,
Thank you Mark again for the BOOT_COMPLETED onReceive sample...I have
implemented my version of the code and can see that it does call the
onReceive method on boot, I've put in a Toast message just to see that its
being called.
However, the logic I've added to kick start my application by installing a
new alarm in the alarm manager as shown in the example doesn't work. I
don't get any exception raised, I've put a Toast message before and after
the calls to the alarm manager setting and both are displayed, but the alarm
itself doesn't fire:
public class onBootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Get application settings
clsWallpaper.wpSettings settings = clsWallpaper.getSettings( context
);
if ( settings == null ) {
Toast.makeText(context, "Cannot get Wall-paper\nsettings",
Toast.LENGTH_SHORT).show();
return;
}
Toast.makeText(context, "Wall-paper interval:\n" + Long.toString(
settings.m_lngInterval ), Toast.LENGTH_SHORT).show();
clsWallpaper.startService(context,
settings.m_intNextImg,
settings.m_intScaling,
settings.m_intRotation,
settings.m_lngInterval);
Toast.makeText(context, "Wall-paper onBootReceiver",
Toast.LENGTH_SHORT).show();
}
}
Thank you,
Simon
--
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