SmartDroidDeveloper / google-api-java-client

Automatically exported from code.google.com/p/google-api-java-client
0 stars 0 forks source link

How to get calendar color using this library? #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which Google API and version (e.g. Google Calendar Data API version 2)?
I'm using "google-api-java-client-1.3.1-alpha"

What format (e.g. JSON, Atom)?
Atom

What Authentation (e.g. OAuth, OAuth 2, Android, ClientLogin)?
Android

Java environment (e.g. Java 6, Android 2.3, App Engine 1.4.2)?
Android 2.2

External references, such as API reference guide?

Please provide any additional information below.

I'm trying to pull "gCal:color". I tried adding a "color" @Key to the Entry 
class but that caused a HTTP 400 error. I noticed the GData lib has 
"getColor()" and "setColor(ColorProperty)", but I'm not sure if I want to 
include that jar into my project just so I can get access to color (and other 
gCal namespace items).  Thoughts?  I'm a little new to xml namespaces so 
forgive me if the answer is really obvious..

Original issue reported on code.google.com by gvd...@gmail.com on 16 Apr 2011 at 5:31

GoogleCodeExporter commented 9 years ago
I tried adding this to CalendarEntry, but color is null after the request is 
finished:

@Key("gCal:color")
public String color;

Thoughts?

Original comment by gvd...@gmail.com on 16 Apr 2011 at 6:26

GoogleCodeExporter commented 9 years ago
The right place to ask this kind of question is on the Google Group.  See:

http://code.google.com/p/google-api-java-client/wiki/Support#Discussion_Group_(Q
uestions,_Comments)

Make sure you are using XmlNamespaceDictionary to set the "gCal" namespace.

Original comment by yan...@google.com on 17 Apr 2011 at 12:03