ContentProvider的Andr​​oid的许可 [英] ContentProvider android permission

查看:136
本文介绍了ContentProvider的Andr​​oid的许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有人聪明那么我可以回答这个问题。

在默认情况下可以所有Android数据库通过ContentProvider的访问,或者确实有问题的应用程序必须明确地授予权限与CP分享之前,另一个程序可以访问其数据库?

如果他们没有被默认共享,让短应用程序开发人员,包括变更的,根本就围绕它的唯一途径?


解决方案

  

在默认情况下可以所有Android数据库通过ContentProvider的访问,或者确实有问题的应用程序必须明确地授予权限与CP分享之前,另一个程序可以访问其数据库?


默认情况下,的ContentProvider 出口,这意味着第三方可以在其上执行CRUD操作。您可以通过更改此行为:


  • 标记为不出口(的android:出口=FALSE<供应商> 元素)

  • 使用自己的自定义权限,以允许用户有条件地允许接入提供商


  

如果他们没有被默认共享,让短应用程序开发人员,包括变更的,根本就围绕它的唯一途径?


根不会帮你访问其他应用程序的内容提供商。请尊重其他开发者的意愿。

I'm hoping someone smarter then me can answer this question.

By default can all android databases be accessed through the ContentProvider, or does the application in question have to explicitly give permissions to share it with the CP before another program can access its db?

If they are not shared by default, short of getting the application developer to include the change, root would be the only way around it?

解决方案

By default can all android databases be accessed through the ContentProvider, or does the application in question have to explicitly give permissions to share it with the CP before another program can access its db?

By default, a ContentProvider is exported, meaning third parties can perform CRUD operations upon it. You can change this behavior either by:

  • Marking it as not exported (android:exported="false" on the <provider> element)
  • Using your own custom permissions to allow the user to conditionally allow access to the provider

If they are not shared by default, short of getting the application developer to include the change, root would be the only way around it?

Root will not help you access another applications' content provider. Please respect the wishes of the other developer.

这篇关于ContentProvider的Andr​​oid的许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆