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. c-sh-O in Eclipse will supply any missing
imports, or control-Space after a class name will offer to add the
correct import.

If you can't import them, perhaps the project you're trying them in
isn't an Android project?

I don't understand the latter part of the question.

On Apr 14, 3:15 am, mike <[email protected]> wrote:
> 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 books = Uri.parse("content://com.sabretch.colorEyeD/SABRE");
> Cursor cur = managedQuery(books, null, null, null, null);
> to this manageQuery i want to pass parameters to where clause since
> the SABRE.column names are giving errors don;t know what to do?
>
> regards,
> Randika
>
> On Apr 14, 1:09 pm, Bob Kerns <[email protected]> wrote:
>
>
>
> > 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 --
> > com.sabretch.colorEyeD -- but we'll use the same Uri in the next
> > step).
>
> > Once you have your cpc, you run a query. In the query call, using the
> > same Uri, you provide the list of column names; the results will be in
> > that order.
>
> > You can define a class with static fields like People if you want, to
> > identify the column names with field names. That's a good idea,
> > because it lets the compiler detect any typos, but it's not required,
> > they're just strings. The only requirement is that the column names
> > that you use match the column names used by the provider. If the
> > provider is using a database, that in turn will be the column names
> > from the database.
>
> > Your query gives you a Cursor, which you then use to step through the
> > rows, and access the columns. By this point, it's the same as for a
> > built-in provider.
>
> > Hopefully this makes it more clear how the examples would work with
> > your own provider?
>
> > On Apr 13, 11:44 pm, mike <[email protected]> wrote:
>
> > > 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:exported="true"
> > > android:grantUriPermissions="true" android:multiprocess="true"/>
>
> > > so how can i read the data from another application???
> > > if we look at a inbuilt ContentProvider like People. we can read data
> > > by saying People.NAME here NAME is the column name. like wise how can
> > > i use it. here what refers to People in my case??? and how can i
> > > access my columns???
>
> > > regards,
> > > Randika
>
> > > On Apr 14, 10:44 am, SREEHARI <[email protected]>
> > > wrote:
>
> > > > 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 complete uri in ur application which u r accessing the
> > > > content provider. Dont use the static variable CONTENT_URI even if u
> > > > assign the complete value to that.
>
> > > > Regards,
> > > > SREEHARI

-- 
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

To unsubscribe, reply using "remove me" as the subject.

Reply via email to