am fb60f1f2: am ba7d95ae: am 16cf6436: am fbcb624b: Merge "docs: update reference links and misc revisions" into jb-mr1-dev
* commit 'fb60f1f2':
docs: update reference links and misc revisions
page.landing.intro=The Google Analytics Platform lets you measure user interactions with your business across various devices and environments. The platform provides all the computing resources to collect, store, process, and report on these user-interactions.
<li>Call one of the two overloaded <a href="{@docRoot}google/play-services/reference/com/google/android/gms/auth/GoogleAuthUtil.html#getToken(android.content.Context, java.lang.String, java.lang.String)">GoogleAuthUtil.getToken()</a> methods in a foreground activity where you can
>{@code GoogleAuthUtil.getToken()}</a> methods in a foreground activity where you can
display a dialog to the user to interactively handle authentication errors.</li>
<li>Call one of the three <a href="{@docRoot}google/play-services/reference/com/google/android/gms/auth/GoogleAuthUtil.html#getTokenWithNotification(android.content.Context, java.lang.String, java.lang.String, android.os.Bundle)">getTokenWithNotification()</a>
<li>Call one of the three <a href="{@docRoot}reference/com/google/android/gms/auth/GoogleAuthUtil.html#getTokenWithNotification(android.content.Context, java.lang.String, java.lang.String, android.os.Bundle)"
>{@code getTokenWithNotification()}</a>
methods if you are authenticating in a background service or sync adapter so that a notification is displayed if an authentication
<p>Call this method off of the main UI thread since it executes network transactions. An easy way to do this
is in an <a href="http://developer.android.com/reference/android/os/AsyncTask.html">AsyncTask</a>.
is in an {@link android.os.AsyncTask}.
The sample in the Google Play services SDK shows you how to wrap this call in an AsyncTask.
If authentication is successful, the token is returned. If not, the exceptions described in <a href="#handle">Handling Exceptions</a>
If authentication is successful, the token is returned. If not, the exceptions described in
<a href="#handle">Handling Exceptions</a>
are thrown that you can catch and handle appropriately.
</p>
<h3>Using getTokenWithNotification()</h3>
<p>If you are obtaining authentication tokens in a background service or sync adapter, there are three overloaded <code>getTokenWithNotification()</code> methods
<p>If you are obtaining authentication tokens in a background service or sync adapter, there
This method is for use in background services. It displays a notification to the user when authentication errors occur. If a user clicks the notification and then authorizes the app to access the account, the intent is broadcasted. When using this method:
<li><a href="{@docRoot}google/play-services/reference/com/google/android/gms/auth/GoogleAuthUtil.html#getTokenWithNotification(android.content.Context, java.lang.String, java.lang.String, android.os.Bundle, java.lang.String, android.os.Bundle)">getTokenWithNotification(Context context, String accountName, String scope, Bundle extras, String authority, Bundle syncBundle)</a>: This method is for use in sync adapters. It displays a notification to the user when authentication errors occur. If a user clicks the notification and then authorizes the app to access the account, the sync adapter retries syncing with the information
This exception is thrown when an error occurs that users can resolve, such as not yet granting access to their accounts or if they changed their password.
This exception class contains a {@link android.app.Activity#getIntent getIntent()}
method that you can call to obtain an intent that you can use with
@@ -129,8 +153,10 @@ try {
callback when this activity returns to take action based on the user's actions.
This exception is a special case of <a href="{@docRoot}google/play-services/reference/com/google/android/gms/auth/UserRecoverableAuthException.html">UserRecoverableAuthException</a>
Once you have successfully obtained a token, you can use it to access Google services.
@@ -192,5 +226,7 @@ if (serverCode == 200) {
Notice that you must manually invalidate the token if the response from the server
signifies an authentication error (401). This could mean the authentication token
being used is invalid for the service's scope or the token may have expired. If this is the
case, obtain a new token using <a href="{@docRoot}google/play-services/reference/com/google/android/gms/auth/GoogleAuthUtil.html#getToken(android.content.Context, java.lang.String, java.lang.String)">GoogleAuthUtil.getToken()</a>.