Hi,
my broadcast receiver is not receiving power on or off message
my broadcase receiver --
*
import* android.content.BroadcastReceiver;
*
import* android.content.Context;
*
import* android.content.Intent;
*
import* android.util.Log;
*
public* *class* LockScreenReceiver *extends* BroadcastReceiver {
@Override
*public* *void* onReceive(Context arg0, Intent arg1) {
Log.*d*("debug", "working");
System.*out*.println("Lock Screen changes ---> ");
Intent oServiceIntent = *new* Intent( arg0,
com.sybase.mo.passwordsetting.ValidatePassword.*class*);
//arg0.startService( oServiceIntent );
arg0.startActivity(oServiceIntent);
}
}
and menifest is updated ---
<receiver
android:enabled=*"true"*
android:name=*".LockScreenReceiver"*>
<intent-filter>
<action android:name=*"android.intent.action.SCREEN_ON"*/>
<action android:name=*"android.intent.action.SCREEN_OFF"*/>
</intent-filter>
</receiver>
my onRecieve method is called....
what i'm measing.....
On Wed, Jan 5, 2011 at 11:09 PM, TreKing <[email protected]> wrote:
> On Wed, Jan 5, 2011 at 11:33 AM, Rocky <[email protected]> wrote:
>
>> Thanks to reply, is any other way to handle it.
>
>
> There are broadcasts for the screen coming on and off, I think. Look
> through the docs for your options and handle one of those.
>
>
>
> -------------------------------------------------------------------------------------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
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