开发者

Is there Any Way to Lock Screen in my application?

i want to control home button in android for my application only...actually i have created one image of full screen in my application which is called after some task is done..So,when user got this image screen user cant go anywhere and here only i want to control HOME Button..So 开发者_JAVA百科please give some idea or sample to achieve this..

Thanks in Advance----


Yes, you can receive HOME intents. However, the user will have the choice between your "home activity" and the home activity that is bundled with the machine. The user will have to change their home button settings to always use your activity instead of the bundled one, and at that point they won't have any way to get to their real home.

However, none of this has anything to do with the screen you are currently on. This is likely impossible.

In any case, you can receive home key intents with this in your activity element in your manifest:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜