[android-developers] Re: Hidden Contacts

2009-03-19 Thread EboMike

I have the same problem, but I need a better solution. I'm doing a
managed query on the contacts and am already filtering out entries
that do not have a DISPLAY_NAME, but I still get all the suggested
contacts. I need to deal with contacts that have a name but no phone
number or email address.

I guess the proper way would be to check in which group a contact is,
but what's the quickest way to do that in a simple managed query? And
what group is the official Contacts group?

I could look at the source for the contacts app, but maybe there is
an official solution that someone could post here real quick.


On Feb 14, 1:51 pm, Chili chilib...@gmail.com wrote:
 Hey Miguel,

 I was having the same problem. It's not a perfect solution but you can
 check whether the contact has a name and/or phone number and if not
 add then don't add them to your list. Just loop through all the items
 and add items to a List and then use the List to populate you
 listview.

 Chili

 On Jan 27, 5:06 am, Miguel Paraz mpa...@gmail.com wrote:

  On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote:

   bklik's question seemed to indicate that he was dumping the contact
   list programactically via his own activity.  I was just wondering if
   thecontactsAPI was returning allcontactsand the activity needed to
   do the filtering.

  I have the same situation.
  I use the contact list content provider to let the user select an
  email address.
  The SuggestedContactsare irrelevant to my application and just slow
  down the loading process.

  I looked at the SQLite db using the sqlite command line, but couldn't
  find how to differentiate thesecontacts.
  Is there a way?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2009-03-19 Thread EboMike

To answer my own post... I looked at the Contacts source code, and
this is essentially what they do:

The main My contacts group is called
Contacts.Groups.GROUP_MY_CONTACTS.
To query all members in that group, simply use this URI:

Uri uri = Uri.parse(content://contacts/groups/system_id/ +
Contacts.Groups.GROUP_MY_CONTACTS + /members);

Works like a charm for me. I can imagine that at least part of this
URL is contained in the Contacts.Groups.CONTENT_* strings, so it would
be cleaner to use those.

-Mike



On Mar 18, 11:39 pm, EboMike ebom...@gmail.com wrote:
 I have the same problem, but I need a better solution. I'm doing a
 managed query on thecontactsand am already filtering out entries
 that do not have a DISPLAY_NAME, but I still get all the suggestedcontacts. I 
 need to deal withcontactsthat have a name but no phone
 number or email address.

 I guess the proper way would be to check in which group a contact is,
 but what's the quickest way to do that in a simple managed query? And
 what group is the official Contacts group?

 I could look at the source for thecontactsapp, but maybe there is
 an official solution that someone could post here real quick.

 On Feb 14, 1:51 pm, Chili chilib...@gmail.com wrote:

  Hey Miguel,

  I was having the same problem. It's not a perfect solution but you can
  check whether the contact has a name and/or phone number and if not
  add then don't add them to your list. Just loop through all the items
  and add items to a List and then use the List to populate you
  listview.

  Chili

  On Jan 27, 5:06 am, Miguel Paraz mpa...@gmail.com wrote:

   On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote:

bklik's question seemed to indicate that he was dumping the contact
list programactically via his own activity.  I was just wondering if
thecontactsAPI was returning allcontactsand the activity needed to
do the filtering.

   I have the same situation.
   I use the contact list content provider to let the user select an
   email address.
   The SuggestedContactsare irrelevant to my application and just slow
   down the loading process.

   I looked at the SQLite db using the sqlite command line, but couldn't
   find how to differentiate thesecontacts.
   Is there a way?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2009-02-15 Thread Chili

Hey Miguel,

I was having the same problem. It's not a perfect solution but you can
check whether the contact has a name and/or phone number and if not
add then don't add them to your list. Just loop through all the items
and add items to a List and then use the List to populate you
listview.


Chili

On Jan 27, 5:06 am, Miguel Paraz mpa...@gmail.com wrote:
 On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote:

  bklik's question seemed to indicate that he was dumping the contact
  list programactically via his own activity.  I was just wondering if
  thecontactsAPI was returning allcontactsand the activity needed to
  do the filtering.

 I have the same situation.
 I use the contact list content provider to let the user select an
 email address.
 The Suggested Contacts are irrelevant to my application and just slow
 down the loading process.

 I looked at the SQLite db using the sqlite command line, but couldn't
 find how to differentiate these contacts.
 Is there a way?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2009-01-27 Thread Miguel Paraz

On Dec 9 2008, 8:22 am, Paul paul_rash...@yahoo.com wrote:
 bklik's question seemed to indicate that he was dumping the contact
 list programactically via his own activity.  I was just wondering if
 thecontactsAPI was returning allcontactsand the activity needed to
 do the filtering.

I have the same situation.
I use the contact list content provider to let the user select an
email address.
The Suggested Contacts are irrelevant to my application and just slow
down the loading process.

I looked at the SQLite db using the sqlite command line, but couldn't
find how to differentiate these contacts.
Is there a way?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2008-12-11 Thread bklik

Thanks Paul, you were right.  It's funny, I don't use my gmail account
much, and I didn't recall conversing with those individuals in the
past.  Thanks for clearing that up.

Brenton

On Dec 7, 9:50 pm, Paul [EMAIL PROTECTED] wrote:
 Did you check your gmail account under Contacts -- suggested contacts
 to see if the people you're seeing appear there as well?  GMail
 creates ahiddencontact for everyone you've traded emails with and
 perhaps thehiddenpeople are coming from here?

 On Dec 6, 4:07 pm, bklik [EMAIL PROTECTED] wrote:

  Did anyone else find that when you dump all your contacts to a
  ListView, you see hidden contacts that don't show up in your regular
  contact list under the Dialer?

  I found nameless contacts, contacts with names but no numbers.  When I
  returned their email address, I found emails to sale-
  number@craigslist.org, as well as one for a Dana Thompson and a TJ
  Brown.

  These are people I don't know, and never new existed.  And oddly
  enough, the Dana Thompson individual is some CPA in Maryland 
  (see:http://danathompsoncpa.com/Contact_Us.htm).

  Now, I got my phone new, in a sealed box, from a just opened box
  shipped to the T-Mobile store where I picked it up.  I'm wondering if
  they are part of the image used to make the phone?  It's very odd.

  Here's the code I used to return the contacts:

          final Uri data = Uri.parse(content://contacts/people/);
          final Cursor c = this.managedQuery(data, null, null, null,
  null);
          String[] from = new String[] {People.NUMBER, People.NAME};
          int[] to = new int[] {R.id.itemNumber, R.id.itemName};

          SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
  R.layout.listitemlayout, c, from, to);
          ListView lv = (ListView)this.findViewById
  (R.id.contactListView);
          lv.setAdapter(adapter);

  Anyone else getting weird results?

  Brenton
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2008-12-08 Thread Paul

bklik's question seemed to indicate that he was dumping the contact
list programactically via his own activity.  I was just wondering if
the contacts API was returning all contacts and the activity needed to
do the filtering.

On Dec 8, 4:48 pm, Eric Mill [EMAIL PROTECTED] wrote:
 The Suggested Contacts category was specifically created in Gmail so
 that G1 users wouldn't get swamped with a massive, irrelevant contacts
 list.  If the G1 is populating any view of contacts from that list,
 something is wrong.

 I see this too, specifically when Any Cut populates a view of contacts
 for you to create direct call shortcuts to, it includes duplicates of
 many contacts, duplicates which don't appear in my regular Contacts
 list in the dialer.

 -- Eric

 On Dec 7, 9:50 pm, Paul [EMAIL PROTECTED] wrote:

  Did you check your gmail account under Contacts -- suggested contacts
  to see if the people you're seeing appear there as well?  GMail
  creates a hidden contact for everyone you've traded emails with and
  perhaps the hidden people are coming from here?

  On Dec 6, 4:07 pm, bklik [EMAIL PROTECTED] wrote:

   Did anyone else find that when you dump all your contacts to a
   ListView, you see hidden contacts that don't show up in your regular
   contact list under the Dialer?

   I found nameless contacts, contacts with names but no numbers.  When I
   returned their email address, I found emails to sale-
   number@craigslist.org, as well as one for a Dana Thompson and a TJ
   Brown.

   These are people I don't know, and never new existed.  And oddly
   enough, the Dana Thompson individual is some CPA in Maryland 
   (see:http://danathompsoncpa.com/Contact_Us.htm).

   Now, I got my phone new, in a sealed box, from a just opened box
   shipped to the T-Mobile store where I picked it up.  I'm wondering if
   they are part of the image used to make the phone?  It's very odd.

   Here's the code I used to return the contacts:

           final Uri data = Uri.parse(content://contacts/people/);
           final Cursor c = this.managedQuery(data, null, null, null,
   null);
           String[] from = new String[] {People.NUMBER, People.NAME};
           int[] to = new int[] {R.id.itemNumber, R.id.itemName};

           SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
   R.layout.listitemlayout, c, from, to);
           ListView lv = (ListView)this.findViewById
   (R.id.contactListView);
           lv.setAdapter(adapter);

   Anyone else getting weird results?

   Brenton
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---



[android-developers] Re: Hidden Contacts

2008-12-07 Thread Paul

Did you check your gmail account under Contacts -- suggested contacts
to see if the people you're seeing appear there as well?  GMail
creates a hidden contact for everyone you've traded emails with and
perhaps the hidden people are coming from here?

On Dec 6, 4:07 pm, bklik [EMAIL PROTECTED] wrote:
 Did anyone else find that when you dump all your contacts to a
 ListView, you see hidden contacts that don't show up in your regular
 contact list under the Dialer?

 I found nameless contacts, contacts with names but no numbers.  When I
 returned their email address, I found emails to sale-
 number@craigslist.org, as well as one for a Dana Thompson and a TJ
 Brown.

 These are people I don't know, and never new existed.  And oddly
 enough, the Dana Thompson individual is some CPA in Maryland 
 (see:http://danathompsoncpa.com/Contact_Us.htm).

 Now, I got my phone new, in a sealed box, from a just opened box
 shipped to the T-Mobile store where I picked it up.  I'm wondering if
 they are part of the image used to make the phone?  It's very odd.

 Here's the code I used to return the contacts:

         final Uri data = Uri.parse(content://contacts/people/);
         final Cursor c = this.managedQuery(data, null, null, null,
 null);
         String[] from = new String[] {People.NUMBER, People.NAME};
         int[] to = new int[] {R.id.itemNumber, R.id.itemName};

         SimpleCursorAdapter adapter = new SimpleCursorAdapter(this,
 R.layout.listitemlayout, c, from, to);
         ListView lv = (ListView)this.findViewById
 (R.id.contactListView);
         lv.setAdapter(adapter);

 Anyone else getting weird results?

 Brenton
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
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
-~--~~~~--~~--~--~---