密码保护系统应用程序android
当用户尝试启动应用程序时,我想禁止该应用程序,然后调用另一个应用程序。示例我希望用户在启动特定系统应用程序(设置应用程序等)之前对自己进行身份验证。每次用户启动设置应用程序时,都会弹出身份验证应用程序,
我知道您将必须使用广播接收器和意图,但不知道如何做到这一点。
When a user tries to launch an application I want to suppress that application and then call another application. Example I want the user to authenticate himself before launching a particular system application (settings application etc). The authentication application should pop up every time the user launches the settings application
I know you will have to use broadcast receivers and intents but have no clue how to do it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
听起来您应该创建一个具有可以使用的公共接口的“lib”项目。
然后在应用程序之间共享它们而不是尝试执行另一个应用程序?
但据我所知,这不可能实际执行另一个应用程序,因为这会依赖于您不知道它是否已安装的东西。如果意图能够实现,那么它必须已经开始。
也像之前的答案一样,它可能被用于滥用。
查看此链接以获取更多信息:
http://mylifewithandroid.blogspot.com/2007/12/playing-with -intents.html
Sounds like you should create a "lib" project that have public interfaces that you can use.
Then share them between the apps instead of trying to execute another app?
But what I know this is not possible to actually execute up another app, since this then gives dependency to something that you don't know if it is installed. It must already been started if the intents should work.
Also like the answer before, it could be used for abuse.
Look at this link for more information:
http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html
我有点希望这是不可能的...启动与用户实际单击的应用程序不同的应用程序?为滥用行为敞开大门。
I sort of hope this isn't possible... Launching a different application from the one the user actually clicked? Leaves the door open for abuse.