Hi Jerome,
I tried your solution, but still it's not working.
I am getting same exception.
ERROR/AndroidRuntime(18573): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.test.access/com.test.access.TestDatabaseApp}:
java.lang.SecurityException: Permission Denial: writing
com.provider.ContactsProvider uri content://com.permission.test/employee
from pid=18573, uid=10027 requires android.permission.permWrite.
and in Content Provider application i wrote
<provider
android:name="ContactsProvider"
android:authorities="com.permission.test"
android:readPermission="android.permission.permRead"
android:writePermission="android.permission.permWrite"/>
and in other application i write
<uses-permission android:name="android.permission.permRead" />
<uses-permission android:name="android.permission.permWrite" />
Please let me know what's wrong i am doing.
Thanks and Regards,
Sohan Badaya
On Tue, Sep 21, 2010 at 1:34 PM, Jerome Deng <[email protected]> wrote:
> Try to add below lines to your app2's manifest file:
> <uses-permission android:name="android.permission.permRead" />
> <uses-permission android:name="android.permission.permWrite" />
>
> On Sep 21, 2:57 pm, Sohan badaya <[email protected]> wrote:
> > Hi All,
> >
> > I have a doubt regarding content provider.My doubt is
> > I create a app1 that creates ContentProvider and in second
> > application(app2) i am using app1's contentprovider methods(like
> > insert, update etc). It's working fine
> > but i want to set some permissions in app1, so that if any other app
> > wants to use that provider it must have to get this permissions(<uses-
> > permissions) then only it should be able to use providers.
> >
> > But when i write
> > <provider
> > android:name="MyContactsProvider"
> > android:authorities="com.permission.test"
> >
> android:readPermission="android.permission.permRead"
> >
> android:writePermission="android.permission.permWrite"/>
> >
> > in app1, other applications are not being able to use provider. I want
> > to know what is the tag that i have to write in other application to
> > use provider.
> >
> > Please help me for the same.
> >
> > Thanks and Regards,
> > Sohan Badaya
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en