android - BroadcastReceiver onReceive is not getting called -
i have defined broadcastreceiver in androidmanifest.xml below
<receiver android:name="com.example.hello.screenunlockreceiver" android:enabled="true" android:singleuser="true"> <intent-filter> <action android:name="android.content.intent.action_user_present" /> </intent-filter> </receiver> and defined receiver below :
public class screenunlockreceiver extends broadcastreceiver { @override public void onreceive(context context, intent intent) { //start activity intent = new intent(); i.setclassname("com.example.hello", "loginactivity"); i.setflags(intent.flag_activity_new_task); context.startactivity(i); } } but broadcastreceiver not triggered when unlock screen , loginactivity not being shown. loginactivity default loginactivity comes android sdk.
am missing in uses-permission or else, please let me know. thanks
santhosh
the action have intercept is:
<intent-filter> <action android:name="android.intent.action.user_present" /> </intent-filter>
Comments
Post a Comment