我知道在系统中注册的公共(命名)意图可以从单个应用程序中使用的任何应用程序和私有(匿名)意图中调用。 请有人给我一个例子,以便更好地理解。
提前致谢
I know that public (named) intents that are registered with the system and can be called from any application and private (anonymous) intents that are used within a single application. please can anyone give me an example for better understanding.
Thanks in advance
最满意答案
抱歉没时间写完整的答案,但您可以创建自定义权限以便签署您的Intents和BroadcastReceivers 。
使用这些自定义权限时,只有使用相同签名密钥签名并包含该自定义权限的应用才能看到这些意图。
这个问题可能对您有所帮助
如何在Android中使用自定义权限?@Commonsware在最近的博客文章中解释了这个问题:
没有意外API - CommonsBlogSorry no time to write a full answer, but you can create custom permissions in order to sign your Intents & BroadcastReceivers.
When you use these custom permissions, only apps that have been signed with the same signing key, and include that custom permission, can see these Intents.
This question might help you:
How to use custom permissions in Android?@Commonsware explains the issue really well in a recent blog post:
Don't have an Accidental API - The CommonsBlog更多推荐
发布评论