Reputation: 95
I'm integrating Google Calendar in my Android app. A user needs to authorize in order to access the events information. I use GoogleAuthorizationRequestUrl for building the authorization request URL. The code is as follows (in the snippet below I replaced the original client id by the string CLIENT_ID):
String url = new GoogleAuthorizationRequestUrl(CLIENT_ID,
"http://localhost",
"https://www.googleapis.com/auth/calendar.readonly").build();
The URL which GoogleAuthorizationRequestUrl builds is:
instead of
In other words I expect to have "scope=https://www.googleapis.com/auth/calendar.readonly" in the URL but I have "b=https://www.googleapis.com/auth/calendar.readonly".
The strange thing is, I get the faulty request URL only when I prepare my APK for publishing. In my debug environment GoogleAuthorizationRequestUrl building a correct URL.
Does anybody have an idea about this behavior?
Thanks, -Ali
Upvotes: 0
Views: 564
Reputation: 95
In case anybody will read this post searching for a solution, I got my implementaiton running by adding the following 2 entries in proguard.cfg:
-keep class com.google.api.client.** { *; }
-keep class com.google.api.services.calendar.model.** { *; }
Upvotes: 0