The most elegant solution for the receiver->service dilemma I've seen
is to use this code in the (standard) service:
public static void lockAndStartService( Context context, Intent
intent ) {
synchronized ( startServiceLock ) {
MyWakeLockManager.acquirePartial( context, TAG );
context.startService( intent );
}
}
Call it from onReceive(). Use MyWakeLockManager to store/synchronize/
debug the WakeLock manipulations coming from different points in your
code.
Works well for me, anyway.
The idea came from the SMSPopup code, thanks to the author.
Lee
--
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