Preventing apps from invoking my Activity

半腔热情 提交于 2019-12-22 06:59:59

问题


I have an Activity X which is only accessible after you've entered a valid credential.

How can I prevent other apps from calling startActivity with an Intent pointing to X ?

e.g.

Intent intent = new Intent( this, ActivityX.class );
startActivity( intent );

Basically I don't want Activity X to be exported to any apps except my app.


回答1:


Check out the "Declaring and Enforcing permissions" section of the Security and Permissions Android SDK documentation.



来源:https://stackoverflow.com/questions/1571615/preventing-apps-from-invoking-my-activity

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