Oh man.. that not going to fly .. I can't do it from the service,
because service runs like for a second to update the widget and
stopSelf(). So if i register something onStart() i'd have to
unregister that onDestroy(). Therefore to actually catch that event
while service is running becomes kind of tricky.
Sigh.. still don't understand why the hell it running updates during
the sleep...

On Jul 30, 3:16 pm, "Mark Murphy" <[email protected]> wrote:
> > Ok.. so i already have an receiver for the widget... and adding
> > screen_on/screen_off should do it ?
> >      <!-- Broadcast Receiver that will process AppWidget updates -->
> >         <receiver android:name="com.package.NewsWidget"
> > android:label="@string/app_name" >
> >             <intent-filter>
> >                 <action
> > android:name="android.intent.action.SCREEN_ON" />
> >                 <action
> > android:name="android.intent.action.SCREEN_OFF" />
> >                 <action
> > android:name="android.appwidget.action.APPWIDGET_UPDATE" />
> >             </intent-filter>
> >             <meta-data android:name="android.appwidget.provider"
> > android:resource="@xml/widget_news" />
> >         </receiver>
> > Strangely i don't receive SCREEN_OFF/SCREEN_ON in my
> > �...@override
> >     public void onReceive(Context context, Intent intent) {
> >  }
>
> Nuts. Further research indicates that, at least as of last December, you
> can only get SCREEN_OFF/SCREEN_ON from in-Java registered receivers:
>
> http://groups.google.com/group/android-developers/browse_frm/thread/8...
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to