I defined BroadCastReceiver in AndroidManifest.xml as 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 the receiver as shown below:
public class ScreenUnlockReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) {
But the transmitter broadcast does not start when I unlock the screen, and the LoginActivity function is not displayed. LoginActivity is the default login feature that comes with sdk for Android.
I missed something in use - permission or something else, please let me know. Thanks
Santhosh
source share