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) { }
On Jul 29, 5:20 pm, Mark Murphy <mmur...@commonsware.com> wrote: > Alexey Volovoy wrote: > > Hm.. let's say i'm not going to schedule next update via alarm if > > screen is off. Service will shut itself down. Then screens is coming > > back what will listen to that broadcast ? > > A BroadcastReceiver registered in your manifest. That receiver then > starts up your service. You may already have one of these if your > service needs to start up at boot time. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://twitter.com/commonsguy > > Android App Developer Training:http://commonsware.com/training.html --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---