How to make our own lock screen in android instead of default lock screen [duplicate]

老子叫甜甜 提交于 2019-11-28 17:40:22
ridoy

Codes that you have used in point 2 should be used as answer of your question 1. Reference is Android activity over default lock screen.

For question 2, see these relevant links:

Before answering your question 3,i would like to ask you, do you have knowledge about BroadcastReceiver? In short it is-

A broadcast receiver (short receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.

For example, applications can register for the ACTION_BOOT_COMPLETED system event which is fired once the Android system has completed the boot process.

Now come to your question 4, you can show home page programmatically by this code:

Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);

Refer: Going to home screen programmatically

And last of all i would like to provide you some links that may help you to make a custom lock screen:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!