Note that there are some explanatory texts on larger screens.

plurals
  1. POPulling data from Google Calendar on Android in JSON
    primarykey
    data
    text
    <p>I'm using Android SDK level 8, Java. I have an app with a WebView and I want to import JSON in it.</p> <p>What I want to achieve is: Send HTTP requests to the <a href="http://code.google.com/apis/calendar/v3/" rel="nofollow noreferrer">Google Calendar API v3</a> and receive data in raw JSON, however, authenticating the request using the Android account manager. I've been looking at the GData Java Client, more specifically at the <a href="http://samples.google-api-java-client.googlecode.com/hg/calendar-android-sample/instructions.html?r=default" rel="nofollow noreferrer">Calendar Android Sample</a>, which authenticates properly, but I want to specifically avoid the following things:</p> <ul> <li>Using the GData API - unacceptable since I want a raw JSON string.</li> <li>Pulling the data directly through JavaScript in the WebView - unacceptable since I would want to implement a SyncProvider in Java to update the JSON string</li> </ul> <p>I found some information about the issue, for example: <a href="http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager" rel="nofollow noreferrer">http://code.google.com/p/google-api-java-client/wiki/AndroidAccountManager</a></p> <p><a href="https://stackoverflow.com/questions/2025985/com-google-gdata-client-googleservice-setusertokenandroid-accounts-accountmanag">com.google.gdata.client.GoogleService.setUserToken(android.accounts.AccountManager.getAuthToken(???))</a></p> <p>However, all the examples are connected with GData. On the other hand, exploring the Google Calendar v3 API page, I could not figure out how to authenticate with an auth token from the Account Manager.</p> <p>In summation: how to retrieve JSON through plain HTTP requests to the Calendar API v3, authenticating the user with the token from the account manager, in Java. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload