I'm trying to detect when the screen times out and puts the phone to
sleep.   There is a Broadcast Action called ACTION_SCREEN_OFF that
appears to be just what I need.   However I can't seem to get it to
catch.   Here's what I have in the Manifest:

        <receiver class=".ScreenOffReceiver"
android:name="ScreenOffReceiver" android:process=":remote">
            <intent-filter>
                 <action
android:name="android.intent.action.SCREEN_OFF" />
                  <category
android:name="android.intent.category.HOME" />
            </intent-filter>
        </receiver>

And this is what the class looks like:

  public class ScreenOffReceiver extends BroadcastReceiver
  {
        private static String TAG="ScreenOffReceiver";

    @Override
    public void onReceive(Context context, Intent intent)
    {
        Log.d(TAG,"onReceive()");
    }
  }

When I hit the power button on the emulator the screen goes dark, but
I never see the log entry.  I originally didn't have the
android:process attribute, but added it after needing to add it for an
Alarm.  It doesn't seem to help either way for this action.

If anybody has some thoughts, it'd be great to hear them.   Thanks.
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to