General :: Filter Contacts By Group With Contacts Contract

Sep 16, 2010

I'm developing a big application and a part of it is about contacts. I want to, first, get all the groups of contacts. And when the users selects one, show all the contacts of the group.

I've seen other applications and widgets (like LauncherPro widget or HTC Sense Widget) than can do it, but when I try, I don't get same results.

My code is:

1.- To get an example group (this is just for testing, in real application user selects):

Code:
long idGroup = 0;
String[] GROUP_PROJECTION = new String[] {
ContactsContract.Groups._ID, ContactsContract.Groups.TITLE };
Cursor c = mcp.getContext().getContentResolver().query(ContactsContract.Groups.CONTENT_URI, GROUP_PROJECTION, null, null, ContactsContract.Groups.TITLE + " ASC");

[Code]...

2.- To filter Users by group??

General :: Filter Contacts by Group with Contacts Contract


Samsung Galaxy S :: How To Filter To Show Google "My Contacts" Group?

Jul 2, 2010

Having had the Nexus one with glorious Stock Android I'm struggling with some of the Samsung 'improvements'. The primary issue for me right now is that I've got the nasty Sammy Contacts app (with it's non-maintained-aspect-ration contact pics, i HATE that) sync to Google Contacts, but it shows them all! On the N1 I could filter so that I could only view 'My Contacts' from Google, a nice limited Group I could readily maintain. I can see no option to do this on the SGS. Anyone found it? Can't wait for a stock android ROM for this beast, it is awesome but as of yet I can't see how Samsung added any value with their SW meddling.

View 6 Replies View Related

General :: Export Group Of Contacts Or Selected Contacts

Dec 30, 2012

I want to export a group of contacts or selected contacts. Is there an app/script?

View 1 Replies View Related

Android :: Filter Out Contacts From Contacts Pick List / Create New Contact

Aug 19, 2009

My application wants a functionality of picking a contact from the phone contact, I have achieved this using the following intent Intent intent = new Intent(Intent.ACTION_PICK, People.CONTENT_URI); startActivity ForResult(intent, 001); I wanted few more functionalities
- An option to create a new contact from the pick list, similar to the one which is available in inbuilt Launcher appliation
- Set of contacts should be filtered from display i.e already selected contacts should not be displayed
- Filtering of contacts should be based on the phone number i.e a contact might have two phone numbers associated with and wants to filter out the phone number which is selected I guess above can be achieved by implementing my own pick list using contacts provider, is there any other way without implementing the new pick list

View 2 Replies View Related

General :: Forward Gmail To Group Contacts

Nov 20, 2011

How to forward a message using the native gmail app on android to a group of contacts already established on gmail? I often need to forward an email to a group of employees but have found no way to do it other than logging on to gmail on the computer which isn't very efficient. It seems hard to believe - any third party app that works with gmail to do so?

View 5 Replies View Related

Android :: Contacts Contract / Building Across Multiple SDK Versions

Jan 11, 2010

I need my app to run on all Android versions, but the Contacts API changed in 2.0. In SDK 1.6 and earlier I use android.provider.Contacts to query the contacts DB, but this does not work in 2.0 Instead, for 2.0 I use android.provider.ContactsContract. This presents a problem: when I have code for ContactsContract, my app will not build for 1.6 and earlier. Do I need to have two separate versions of my app (one for <= 1.6 and one for 2.0 and later) or is there a way to avoid doing this?

View 1 Replies View Related

Android :: Trouble Setting Photos With Contacts Contract

Nov 3, 2009

I'm happily retrieving contact photos with the new Contacts Contract APIs and cursor.getBlob, but I'm having great trouble working out how to set a contact photo.

I believe I have the right URI (at least, it works for retrieving the photo), but it just won't work for updating or adding one.

Here's my best bet:

ByteArrayOutputStream bytes = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bytes);

Uri uri = Uri.withAppendedPath( ContactsContract.Contacts.CONTENT_URI, friendId ); uri = Uri.withAppendedPath( uri, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);

// eg: content://com.android.contacts/contacts/6/photo

ContentValues values = new ContentValues();

values.put(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes.toByteArray()); values.put(ContactsContract.CommonDataKinds.Photo.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );

context.getContentResolver().insert(uri, values);

And here's my exception:

java.lang.UnsupportedOperationException: Unknown uri: content://com.android.contacts/contacts/6/photo at com.android.providers.contacts.LegacyApiSupport.update (LegacyApiSupport.java:914) at com.android.providers.contacts.ContactsProvider2.updateInTransaction (ContactsProvider2.java:2924) at com.android.providers.contacts.SQLiteContentProvider.update (SQLiteContentProvider.java:139) at com.android.providers.contacts.ContactsProvider2.update (ContactsProvider2.java:1923) at android.content.ContentProvider$Transport.update (ContentProvider.java:180) at android.content.ContentProviderNative.onTransact (ContentProviderNative.java:195) at android.os.Binder.execTransact(Binder.java:287) at dalvik.system.NativeStart.run(Native Method).

View 3 Replies View Related

Filter Contacts By Phone Number?

Mar 5, 2012

I try to make "type-to" filter in the my dialer. When I tap a digit, there must be a list (ListView) of supposed contacts (all of them have a number containing a part from my dialer TextView). For example, if I tap 555, there must be presented contacts with such numbers:

555890856
555789734
895550123

1st attempt:

Code:
String phoneNumberPart = //this is the part of phone number. Only part!
final Uri baseUri = ContactsContract.Contacts.CONTENT_FILTER_URI;
final Uri uri = Uri.withAppendedPath(baseUri, Uri.encode(phoneNumberPart));
final String[] projection = CONTACTS_PROJECTION; //_ID, DISPLAY_NAME, LOOKUP_KEY
Cursor cursor = getContentResolver().query(uri, projection, null, null, null);
2nd attempt:

Code:
String phoneNumberPart = //this is the part of phone number. Only part!
final Uri baseUri = ContactsContract.PhoneLookup.CONTENT_FILTER_URI;
final Uri uri = Uri.withAppendedPath(baseUri, phoneNumberPart);
final String[] projection = CONTACTS_PROJECTION; //_ID, DISPLAY_NAME, LOOKUP_KEY
Cursor cursor = getContentResolver().query(uri, projection, null, null, null);

In both attempts cursor count is always 0, despite I dial the phone number of real contact.

Is it possible to filter contacts by this criteria, using Android uris? Or there is no way but "get all contacts, iterate over them and check their numbers"?

View 6 Replies View Related

Samsung Vibrant :: Messenger - Filter Contacts ?

Jul 17, 2010

Still new (< 2 full days) to Vibrant and Android, so I'm not sure if this should go here or in an android forum, but here it goes:

A friend recommended I download Handcent SMS, but I've found I like the built in Messenger a little better... with one caveat. Is there a way to filter the contact list to just contacts on the phone or at least contacts with numbers? It currently includes every single person on Facebook as well as apparently every person I have ever e-mailed with gmail over the last 6 years.

View 2 Replies View Related

HTC EVO 4G :: Can't Add / Delete A Group In People / Contacts

Jun 26, 2010

when I'm at the phone screen and hit menu/people/groups icon(multiple cards) you have the option to "add group" at the top or hit menu again and 2 options appear: Add Group or Delete Group. Either of these options are not functional. They don't work. It seems that HTC forgot to add functionality for this. Does anyone have a solution for this?

View 6 Replies View Related

HTC Incredible :: Need To Change All Of My Contacts To Another Group

May 1, 2010

Ok somehow all my contacts are in the favorites (Group) and with that they are all on my favorites screen which i do not need, I rather have other widgets there then ALL my contacts. So my question is...Can i somehow change all of my contacts to another group to free up that screen?

View 2 Replies View Related

Android :: Safe Way To Get My Contacts Group?

Nov 16, 2009

I'm adding a new contact using the 2.0 Contacts Contract APIs and I was just wondering if this is a safe way to get the "My Contacts" group to set the group membership for my new contact. Or is there a better more standard way to get it? I'm using the literal string "System Group: My Contacts" when I query the Groups table to get the source row for the My Contacts group. I found this constant by poking around in the debugger, but It's not documented anywhere that I could find, so I don't know if it's the right thing to use. Is there an actual constant somewhere that I should be using to find the "My Contacts" group? Code...

View 4 Replies View Related

Android :: Lookup Contacts In A Certain Group

Jan 20, 2010

I am using android 2.0.1. I have a group id and I am trying to find all contacts in this group. I have been banging my head against the wall on this for a while. I can't seem to find a contentprovider that ties these two together.There has to be a standard answer to this question?

View 3 Replies View Related

HTC Desire :: SMS Sent To Group - Some Contacts Get It As MMS / Email

May 13, 2010

When I send a message via SMS to a group I've setup some get it as an email, some as a MMS and some as SMS.

View 9 Replies View Related

Android :: Sync One Group Of Contacts Only (HTC Desire)

Apr 26, 2010

I recently purchased a HTC Desire Android phone and I'm looking for a way to keep a simple, basic contact list updated and synched with my Gmail account. The problem with the default way on my phone is that it will sync every contact on my Gmail. This is a problem as I only want to have contacts from my phone book synched to one gmail group and vice versa. There is an option to "disply only contacts with numbers" but I still don't like the idea of having every contact on the phone. There is also the problem of the extra empty groups I won't be using, can these be gotten rid of?

I basically just want one list and it to be my default list with all contacts and not have to go through an array of menus to get to that one list on the phone. I don't want that list to be populated by contacts who I may have only emailed once and will never email again. I don't want any gimmicks in between, no gtalk contacts, no facebook contacts, no default gmail contacts and I want to be able to then export this group to a CSV file to use with spreadsheets etc.

This seems to be possible on Android stock and even on HTC Hero Sense UI according to here: Tidy up your Contact List with a Custom Sync Group | Androidheadlines.com
but in the Desire Sense UI, when you go to people/groups/menu, it only gives the option to delete or add. Seems this guy is having the same issue, he has the sync group option but his friend doesn't, both using the same phone. No "Sync Groups" option

There are reports from this thread that some users have had this same problem. Some have a "Sync Groups" option when they go to People>Group Tab and click menu, most don't have this option however and I'm yet to hear from a desire user with this option. Also from this thread (Just want to sync 'My Contacts' on Android, not everything! - Google Mobile Help) one user reported that a "hard reset" gave him the "Sync Group" option. I tried this but had no luck, still the same menu as before.

View 13 Replies View Related

Android :: Way To Have Group Contacts / Text Message

Mar 16, 2010

Alright so I REALLY need to create a group contact folder. You see I have to manage about 10 guys and its convenient that they all have cellphones whats NOT convenient is I can't find a way to put them into a group and text them with one group message! I need to make sure these guys show up to where they are needed and texting all 10 of them separately is a pain in the rear end. So far the other threads don't seam of any use.

View 3 Replies View Related

Sony Ericsson :: How To Group Contacts With X10 Mini Pro?

Jul 28, 2010

I would like to know how can I group my phone contacts.I have have been searching hi and low in the phone. This will enable me to send a same message to a list of contacts.

View 1 Replies View Related

Android :: Update All Contacts Belonging To One Group

Sep 28, 2009

I have an application that updates all the contacts belonging to a group, I currently do the following : -> Get the group id -> Get all the contacts id inside this group -> For each of them I am doing an update on the contact => This is really heavy and seems to take time in real phones while I expect it to be "instantaneous". I am wondering if we can, in the ContentResolver.update() method specify a kind of join. For instance I'd like to do something like : UPDATE <people> SET <people.name>="<new name>" FROM People p, Groups Memberships gm WHERE p.person_id=gm.person_id and gm.group_id=<my_group_id> Does anyone know if it's possible or not? The update method has got a "where" attribute but can we use this attribute for complexe requests?

View 3 Replies View Related

Android :: Is It Possible To Pick Contacts From A Single Group ?

Mar 23, 2009

I'm using ACTION_PICK to show a contact picker:startActivityForResult( new Intent(Intent.ACTION_PICK, Uri.parse("content://contacts/people") ) ,RESULT_PICK_CONTACT_REQUEST); I'd really like to be showing only contacts from the My Contacts group, rather than the list which includes all the auto-generated contacts. I had hoped to find an Extra to specify the group, but I can't find any sign of one. Is there any way to pick a contact from a specified group, or do I need to write my own picker?

View 3 Replies View Related

HTC Eris :: Creating A Shortcut For 1 Group In Contacts?

Nov 5, 2010

Is is possible to create a shortcut to or even a folder that contains only one "group" from contacts? For example a shortcut to "family" or "co-workers". Or a folder with only your "friends" group? The add to home shortcut screen does not offer this option.

View 2 Replies View Related

HTC EVO 4G :: Possible To Assign A Ringtone To An Entire Group Of Contacts

Jul 7, 2010

I would like to assign a specific ring tone to family members on my HTC EVO, is there a way to do it without indivdually assigning the ring tone to each Group member.

View 3 Replies View Related

HTC Droid Eris :: Creating Folder For Group Contacts

Dec 5, 2009

Am I able to create a folder that contains my group contacts?

View 5 Replies View Related

Motorola Droid :: Joining Contacts / Creating A Group?

Nov 29, 2009

How do I join my contacts? How do I create a group in my contact list?

View 15 Replies View Related

Samsung Galaxy S :: Moving Contacts Into Gmail Group

Jul 26, 2010

I have two accounts, exchange and gmail.All the contacts I care about are in gmail.I also set up my exchange to sync contacts.900 of my contacts are now in the 'corporate' group in contacts on my Galaxy.This means changing those doesn't sync to google.com/contacts and vice versa

question 1: Any way to move all those contacts over to gmail group so they sync?

question 2: Any ideas how this happened?

View 1 Replies View Related

Android : How To Add Manually Contacts Group To Droid Database?

Feb 26, 2010

I want to define some Contact Groups. I am wondering where and how does Android store the groups. Maybe in a Sqlite database? If so, will be able to run a insert on it? Otherwise how do you add new Contacts Group via the emulator?

View 2 Replies View Related

Android :: Can Edit Contact Group Of Google Contacts On Handset

Feb 11, 2010

I have them filtered on the Handset so that only those marked as Friends or Family under Gmail contacts are shown. I can't help this as otherwise I'd have well over 1000 contacts to scroll through on my phone.

My issue is that should I add a contact on my phone it doesn't appear. This is obviously because when it's created it has no group membership. It still resolves against SMS etc but is not displayed in the Contacts list. I can (when near a computer) quickly jump onto gmail, manage contacts and put the person into the right group but ideally I'd like to be able to do this on the handset.

Is there any way at all of editing Google Contact Group membership on the handset? I certainly can't find the option if it exists. Alternatively is it possible to change it so when the contact is create on the handset that it automatically saves as a 'Friend'.

View 1 Replies View Related

Motorola Droid X :: How To Associate / Move Employee Contacts Under Group?

Jul 21, 2010

I have a group on gmail called coworkers. I added many of the employees in my company as contacts. I am now running Launcher Pro as well for what that is worth. I found the option to check coworkers as a group, but I can't figure out how to associate or move the employee contacts under that group. What am I missing? Or am I going about this the wrong way entirely?

View 1 Replies View Related

Android :: Query Membership Not Find Contacts In Specific Group

Jul 30, 2009

I try to query contacts in a specific group by GroupMembership. But It only works fine with system built-in group "Starred in Android".

My codes is like this:
private static String[] GRP_PROJECTION = new String[] { GroupMembership.PERSON_ID, GroupMembership.GROUP_ID };
Cursor groupCursor = context.getContentResolver(). query(GroupMembership.CONTENT_URI, GRP_PROJECTION, "group_id=" + filterGroup_id, null, null);
Log.d(TAG, "number = "+ getCount());

If filterGroup_id is system built-in group id(Starred in Android), log.d() shows the number of contacts in group. But if filterGroup_id is my self-defined group id, log.d() shows the contacts of person in my defined group is always ZERO! Even there is actually some contacts in my defined group. Is this a bug for SDK1.5 R2?

View 2 Replies View Related

Android :: Group List Application - Block All Calls Except From Contacts

Mar 28, 2010

I have an ex that keeps calling me. I blocked his # in my address book to go to voicemail, now he calls me from random #'s and its getting really annoying. I don't want to keep my phone shut off all the time. I called tmo and a really nice tech advised me to look for group app that will help, I am looking for an app that will let me block all calls except for my contacts or certain #'s I want the calls coming in.

View 7 Replies View Related

Sony Ericsson Xperia X10 :: Way To Create Group Contacts In Phonebook

Jul 23, 2010

Is it possible to create group contacts in your phonebook to send group texts to those contacts? If so, how could I do it please.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved