[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
hi guys, hi SREEHARI, i have also created a ContentProvider. and i want to access this ContentProvider from another application. this is the Manifest.xml in the contentProvider created application. provider android:name=.database.CProvider android:authorities=com.sabretch.colorEyeD

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread kiran
hi Sreehari, I used the following content URI as follows Uri myURI = Uri.parse(content://com.android.mytable/table1); The above i used in application one while creating database The same myURI used in application2 two query the table. com.android.mytable is the actual package name of the

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
I believe your problem is that you don't declare the permissions with the permission/ tag in the Application1 manifest. To verify this, I created two apps, with your manifests. I changed the package name from 'com.android' to 'com.example', because you shouldn't be using com.android, but

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
Of course, you should use something other than @string/hello as the descriptions! It insists on a resource, and I just grabbed those. On Apr 14, 12:53 am, Bob Kerns r...@acm.org wrote: I believe your problem is that you don't declare the permissions with the permission/ tag in the Application1

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
You get your ClientProviderClient like this: Uri uri = Uri.parse(content://com.sabretch.colorEyeD/ yourtable); ContentProviderClient cpc = getContentResolver().acquireContentProviderClient(uri); (This only uses the authority part of the Uri --

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
hi Bob, thanks for your reply. mind me what exactly is this ContentProviderClient as well as acquireContentProviderClient. i'm getting error when i implement those. even there's no way to import them. is it a class which should be implemented by me currently this is what i'm doing Uri

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
hi Bob, thanks for your reply. mind me what exactly is this ContentProviderClient as well as acquireContentProviderClient. i'm getting error when i implement those. even there's no way to import them. is it a class which should be implemented by me currently this is what i'm doing Uri

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread kiran
hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null Below is my code in reading data in application2 String columns[] = new String[] { _id,roll,name}; Uri myUri = Uri.parse(content://com.example.mytable/table1);

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
i'm also having the same issue, guys help us now trying to sort out this thing from the evening regards, Randika On Apr 14, 5:31 pm, kiran saikiran@gmail.com wrote: hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
i'm also having the same issue, guys help us now trying to sort out this thing from the evening regards, Randika On Apr 14, 5:31 pm, kiran saikiran@gmail.com wrote: hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
i'm also having the same issue, guys help us now trying to sort out this thing from the evening regards, Randika On Apr 14, 5:31 pm, kiran saikiran@gmail.com wrote: hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
i'm also having the same issue, guys help us now trying to sort out this thing from the evening regards, Randika On Apr 14, 5:31 pm, kiran saikiran@gmail.com wrote: hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread mike
i'm also having the same issue, guys help us now trying to sort out this thing from the evening regards, Randika On Apr 14, 5:31 pm, kiran saikiran@gmail.com wrote: hi bobs i followed u r suggestion. Now i over come exception ie read permission denied. But while quering data i got null

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
You don't need to post multiple times; your posts are getting through. ContentProviderClient is a class in the android.content package. acquireContentProviderClient() is a method on ContentResolver class. You can find these in the documentation, or you even easier, Eclipse can find them for you.

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-14 Thread Bob Kerns
I think you're going to have to break out the debugger and see. I dropped your code into my app I set up to verify my response to you earlier, and made my app1's provider return this cursor: public Cursor query(Uri uri, String[] projection, String selection,

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-13 Thread kiran
Hi sreehari thanks for your reply. But i didn't solved my problem. I will give some more inputs to you Application1 Manifest file looks like this ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.android.mytable

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-13 Thread SREEHARI
Hi Kiran, I want to know how you are specifying the content uri?? Can u pls provide the code snippet of your CONTENT URI.. I used Uri mUri = Uri.parse(content://com.wipro.FTCProvider.CellInfo/ profiles); instead of Uri mUri = Uri.parse(CellInfo.CONTENT_URI) ; Try to give the

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-11 Thread SREEHARI
Hi, In the manifest file of both applications you have to give permissions. In the manifest file of application with content provider you have to give the following permission provider android:name=. android:authorities=.

[android-developers] Re: how to read database of one application in another application using contentproviders

2010-04-09 Thread Bob Kerns
But he says he's using a content URI? As in going through a content provider? I think we need more information. BTW, it *is* possible to read another app's DB directly, if you sign both with the same cert and give them the same userid. But that's probably not what he wants to do here... On Apr