How to get synced Google contact group programmatically ?

by Goutom » Thu, 19 May 2011 14:55:37 GMT


Sponsored Links
 Hi All

We know android phone can sync google contact group dynamically if we add
account.Now I want to get the file where the groups information  are saved.I
need code to get groups information and need to show in my activity.

Can any one help ?

Cheers
Goutom
WebRep
Overall rating

-- 



Re: How to get synced Google contact group programmatically ?

by Jens » Fri, 20 May 2011 06:32:10 GMT


 I assume you mean :

 http://developer.android.com/reference/android/provider/ContactsContract.Groups.html 
 http://developer.android.com/reference/android/provider/ContactsContract.CommonDataKinds.GroupMembership.html 

Groups & group membership information is in the same ContentProvider
that stores the actual contacts synced with Google.




-- 


Sponsored Links


Other Threads

1. Possible bug with Intents and PendingIntents on Android 2.0 AVD

Hi everyone,

i have some code that is creating and removing alarms, and which works
great in Android 1.5 and 1.6 but breaks on the Android 2.0 AVD.

The code that's giving this exception is:

      Intent intent = new Intent(context, AlarmReceiver.class).setFlags
(
          Intent.FLAG_ACTIVITY_NEW_TASK).putExtra(SleepDB.KEY_ID, 0);
      PendingIntent pi = PendingIntent.getBroadcast(context, 0 /* id
*/,
          intent, 0);

The second line has the problems, the one which actually gets the
broadcast. I pasted below the relevant part of the log:

11-07 12:08:56.042: ERROR/AndroidRuntime(242): Uncaught handler:
thread main exiting due to uncaught exception
11-07 12:08:56.062: ERROR/AndroidRuntime(242):
java.lang.IllegalArgumentException: Can't use
FLAG_RECEIVER_BOOT_UPGRADE here
11-07 12:08:56.062: ERROR/AndroidRuntime(242):     at
android.os.Parcel.readException(Parcel.java:1222)
11-07 12:08:56.062: ERROR/AndroidRuntime(242):     at
android.os.Parcel.readException(Parcel.java:1206)
11-07 12:08:56.062: ERROR/AndroidRuntime(242):     at
android.app.ActivityManagerProxy.getIntentSender
(ActivityManagerNative.java:2053)
11-07 12:08:56.062: ERROR/AndroidRuntime(242):     at
android.app.PendingIntent.getBroadcast(PendingIntent.java:230)
11-07 12:08:56.062: ERROR/AndroidRuntime(242):     at
com.teo.lifestyle.sleep.Utils.deleteAlarms(Utils.java:57)

I googled FLAG_RECEIVER_BOOT_UPGRADE but there were no results. Since
this works ok on previous versions of Android i assume it's a bug..
Should i file it or have i actually missed something?

Thanks!

-- 

2. error when starting Android project in Eclipse

Hello,

What might be wrong?

eclipse.buildId=M20090917-0800
java.version=1.6.0_14
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=hu_HU
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.java.product


Error
Sat Nov 07 11:06:58 EET 2009
An internal error occurred during: "Launching test1".

*java.lang.NullPointerException*
at
com.android.ide.eclipse.adt.internal.launch.AndroidLaunchController.launch(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.doLaunch(Unknown
Source)
at
com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(Unknown
Source)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at
org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at
org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:866)
at
org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1069)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

and second error
*Unable to restore source lookup path - unknown type source container type
specified: org.eclipse.cdt.debug.core.containerType.mapping*

-- 
Mrton

-- 

3. Issue about the uri is null.

4. Market on emulator, scamming opportunity ?

5. Market on emulator, scamming opportunity ?

6. Android 1.6 and SIM for Data Communications

7. Standard Android Icons & Images