• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to get distinct raw contact id

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have to get distinct raw contact id using content resolver.


Cursor cursor = getContentResolver().query(Data.CONTENT_URI, null, null, null, null);

in this query, 3rd parameter is selection. by passing null we will get all rows.

but i want rows with unique raw contact id.

what should i pass in selection.

Waiting for reply.

 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try the Contacts content provider instead of Data provider...
 
goel swati
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hv to extract data from data table. that's y i m using URI of data table.

my data table consists of...

Mimetype_id Raw_Contact_id Data1
6 1 Name
6 2 Name
6 3 Name
6 4 Name
5 4 Ph. Number
5 3 Ph. Number
5 2 Ph. Number
5 1 Ph. Number

Now I have to find out the cursor.

And display the details in list view as following....

Name
Ph. Number
Name
Ph. Number

and so on...

In list view, each row consists of 2 text views.
first text view should contains the name of the person and the 2nd text view should contains the phone number of that person.


Waiting for reply........
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic