开发者

change my home in android if my application is running!

I want to change my home in android device my re开发者_StackOverflow中文版quirements are like following whenever I run my application my that time on pressing home key should be disabled so that time on pressing home key should do nothing. but if I close that application my home should be the previous one that is launcher

So it is possible on basis of running application my home get set I use to change in manifest.xml file and disabling the package com.android.launcher but it won't satisfy me.


Long story short... no, you cannot do this.

There are some things you can do as workarounds that would themselves be hacky at best and basically not deliver the functionality you want. Like making your application be home replacement (launcher) itself then applying the desired functionality but even in that scenario it wouldn't do what you described you want done because you wouldn't really ever get back to the previous user defined home app (launcher) and there would be system dialogs the user would need to traverse to set your app as the home replacement (launcher).

Just so it is super clear though, you cannot override the functionality of the home button without the user confirming the action.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜