Hello everybody.
Carter, did you find out what was the problem?
I am having exact same issue.
the receivers are installed with no problems, however they do not
receive SCREEN_ON or SCREEN_OFF broadcasts for some reason, unless I
do everything programatically.
Here is the receiver snippet from my manifest:
<receiver android:name=".ScreenOnBroadcastReceiver"
android:process=":remote">
 <intent-filter>
   <action android:name="android.intent.action.SCREEN_ON"></action>
 </intent-filter>
</receiver>
<receiver android:name=".ScreenOffBroadcastReceiver"
android:process=":remote">
  <intent-filter>
    <action android:name="android.intent.action.SCREEN_OFF"></action>
  </intent-filter>
</receiver>

Ideas are appreciated!
Thanks :-)


On Dec 4 2008, 1:22 pm, Carter <[email protected]> wrote:
> I'm trying to detect when the phone's screen turns on and off with the
> SCREEN_ON andSCREEN_OFFIntents.  A BroadcastReceiver declared in the
> AndroidManifest doesn't work with these screen on/off Intents, but
> instantiating a BroadcastReceiver programatically at runtime does
> work.
>
> As far as troubleshooting goes: my AndroidManifest BroadcastReceiver
> is properly receiving other Intents, such as for phone boot.  There is
> no helpful information in LogCat.  And this isn't a permissions issue,
> since it works when declared programatically.
>
> There are no explanations in the JavaDocs (e.g. its not like the
> battery changed Intent which cannot be declared in the Manifest),
> although when searching through the Android source I discovered that
> none of the Android OS services declare interest this particular
> Intent in XML either.
>
> So any ideas why I can't declare SCREEN_ON andSCREEN_OFFin the
> AndroidManifest?
--~--~---------~--~----~------------~-------~--~----~
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