在接收消息广播的onReceive里,跳转到你要显示的界面。如:

Intentintent=newIntent(arg0,MainActivity.class);intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);arg0.startActivity(intent);

在该activity的onCreate()方法里:

super.onCreate(savedInstanceState);getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED|WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);setContentView(R.layout.activity_main);

设置activity的theme属性:

android:theme="@android:style/Theme.Wallpaper.NoTitleBar"

添加点击事件,进入app,突破锁屏:

KeyguardManagerkeyguardManager=(KeyguardManager)getSystemService(KEYGUARD_SERVICE);KeyguardLockkeyguardLock=keyguardManager.newKeyguardLock("");keyguardLock.disableKeyguard();

在menifest中加入该权限:

<uses-permissionandroid:name="android.permission.DISABLE_KEYGUARD"/>