标签:android
在接收消息广播的onReceive里,跳转到你要显示的界面。如:
Intent intent = new Intent(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);
android:theme="@android:style/Theme.Wallpaper.NoTitleBar"
KeyguardManager keyguardManager = (KeyguardManager) getSystemService(KEYGUARD_SERVICE); KeyguardLock keyguardLock = keyguardManager.newKeyguardLock(""); keyguardLock.disableKeyguard();
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
标签:android
原文地址:http://blog.csdn.net/doots/article/details/38818931