admin管理员组文章数量:1405115
By including the following <intent>
element within the <queries>
tag in the AndroidManifest.xml
file, I can access a list of all installed apps on a device:
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
</queries>
Since most Android apps have a launcher activity, doing the following returns all the apps installed in an android device:
getPackageManager().queryIntentActivities(new Intent(Intent.ACTION_MAIN), PackageManager.MATCH_ALL)
Isn't this a potential privacy loophole and almost equivalent to the very sensitive QUERY_ALL_PACKAGES
permission? I see so many apps with this intent element under the queries element in their manifest files.
By including the following <intent>
element within the <queries>
tag in the AndroidManifest.xml
file, I can access a list of all installed apps on a device:
<queries>
<intent>
<action android:name="android.intent.action.MAIN" />
</intent>
</queries>
Since most Android apps have a launcher activity, doing the following returns all the apps installed in an android device:
getPackageManager().queryIntentActivities(new Intent(Intent.ACTION_MAIN), PackageManager.MATCH_ALL)
Isn't this a potential privacy loophole and almost equivalent to the very sensitive QUERY_ALL_PACKAGES
permission? I see so many apps with this intent element under the queries element in their manifest files.
1 Answer
Reset to default 4doing the following returns all the apps installed in an android device:
FWIW, that code returns activities, not apps.
Isn't this a potential privacy loophole and almost equivalent to the very sensitive
QUERY_ALL_PACKAGES
permission?
Yes, which is why I and others wrote about this years ago.
Bear in mind that Google (and other app distributors) could penalize developers for having overly-broad <queries>
requests.
本文标签: quotandroidintentactionMAINquot intent in queries element in AndroidManifestxmlStack Overflow
版权声明:本文标题:"android.intent.action.MAIN" intent in queries element in AndroidManifest.xml - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744317818a2600348.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论