diff --git a/docs/html/google/auth/api-client.jd b/docs/html/google/auth/api-client.jd deleted file mode 100644 index 8f926f571f6d6b6bb1c73a5ca5952c0762cefcbe..0000000000000000000000000000000000000000 --- a/docs/html/google/auth/api-client.jd +++ /dev/null @@ -1,654 +0,0 @@ -page.title=Accessing Google APIs -page.tags="oauth 2.0","GoogleAuthUtil" - -trainingnavtop=true -startpage=true - -@jd:body - -
When you want to make a connection to one of the Google APIs provided in the Google Play services -library (such as Google+, Games, or Drive), you need to create an instance of {@code -GoogleApiClient} ("Google API Client"). The Google API Client provides a common entry point to all -the Google Play services and manages the network connection between the user's device and each -Google service.
- -If the Google API you want to use is not included in the Google Play services library, you can -connect using the appropriate REST API, but you must obtain an OAuth 2.0 token. For more -information, read Authorizing with Google -for REST APIs.
-This guide shows how you can use Google API Client to:
--Note: If you have an existing app that connects to Google Play services with a -subclass of {@code GooglePlayServicesClient}, you should migrate to {@code -GoogleApiClient} as soon as possible.
- - -
--Figure 1. An illustration showing how the Google API Client provides an -interface for connecting and making calls to any of the available Google Play services such as -Google Play Games and Google Drive.
- - - -To get started, you must first install the Google Play services library (revision 15 or higher) for -your Android SDK. If you haven't done so already, follow the instructions in Set Up Google -Play Services SDK.
- - - - -Once your project is linked to the Google Play services library, create an instance of {@code -GoogleApiClient} using the {@code -GoogleApiClient.Builder} APIs in your activity's {@link -android.app.Activity#onCreate onCreate()} method. The {@code -GoogleApiClient.Builder} class -provides methods that allow you to specify the Google APIs you want to use and your desired OAuth -2.0 scopes. For example, here's a {@code -GoogleApiClient} instance that connects with the Google -Drive service:
--GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) - .addApi(Drive.API) - .addScope(Drive.SCOPE_FILE) - .build(); -- -
You can add multiple APIs and multiple scopes to the same {@code -GoogleApiClient} by appending -additional calls to -{@code addApi()} and -{@code addScope()}.
- -
-Important: If you are adding multiple APIs to a
-GoogleApiClient,
-you may run into client connection errors on devices that do not have the
-Android
-Wear app installed. To avoid connection errors, call the
-{@code addApiIfAvailable()}
-method and pass in the {@code
-Wearable} API to indicate that your client should gracefully handle the missing API.
-For more information, see Access the Wearable API.
Before you can begin a connection by calling {@code connect()} on the {@code -GoogleApiClient}, you must specify an implementation for the callback interfaces, {@code ConnectionCallbacks} and {@code OnConnectionFailedListener}. These interfaces receive callbacks in -response to the asynchronous {@code connect()} method when the connection to Google Play services -succeeds, fails, or becomes suspended.
- -For example, here's an activity that implements the callback interfaces and adds them to the Google -API Client:
- -
-import com.google.android.gms.common.api.GoogleApiClient;
-import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
-import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
-import gms.drive.*;
-import android.support.v4.app.FragmentActivity;
-
-public class MyActivity extends FragmentActivity
- implements ConnectionCallbacks, OnConnectionFailedListener {
- private GoogleApiClient mGoogleApiClient;
-
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Create a GoogleApiClient instance
- mGoogleApiClient = new GoogleApiClient.Builder(this)
- .addApi(Drive.API)
- .addScope(Drive.SCOPE_FILE)
- .addConnectionCallbacks(this)
- .addOnConnectionFailedListener(this)
- .build();
- ...
- }
-
- @Override
- public void onConnected(Bundle connectionHint) {
- // Connected to Google Play services!
- // The good stuff goes here.
- }
-
- @Override
- public void onConnectionSuspended(int cause) {
- // The connection has been interrupted.
- // Disable any UI components that depend on Google APIs
- // until onConnected() is called.
- }
-
- @Override
- public void onConnectionFailed(ConnectionResult result) {
- // This callback is important for handling errors that
- // may occur while attempting to connect with Google.
- //
- // More about this in the next section.
- ...
- }
-}
-
-
-With the callback interfaces defined, you're ready to call {@code connect()}. To gracefully manage -the lifecycle of the connection, you should call {@code connect()} during the activity's {@link -android.app.Activity#onStart onStart()} (unless you want to connect later), then call {@code disconnect()} during the {@link android.app.Activity#onStop onStop()} method. For example:
-
- @Override
- protected void onStart() {
- super.onStart();
- if (!mResolvingError) { // more about this later
- mGoogleApiClient.connect();
- }
- }
-
- @Override
- protected void onStop() {
- mGoogleApiClient.disconnect();
- super.onStop();
- }
-
-
-However, if you run this code, there's a good chance it will fail and your app will receive a call -to {@code onConnectionFailed()} with the {@code SIGN_IN_REQUIRED} error because the user account -has not been specified. The next section shows how to handle this error and others.
- - -When you receive a call to the - -{@code onConnectionFailed()} callback, you should call {@code hasResolution()} on the provided {@code ConnectionResult} object. If it returns true, you can -request the user take immediate action to resolve the error by calling {@code startResolutionForResult()} on the {@code ConnectionResult} object. The {@code startResolutionForResult()} behaves the same as {@link -android.app.Activity#startActivityForResult startActivityForResult()} and launches the -appropriate activity for the user -to resolve the error (such as an activity to select an account).
- -If {@code hasResolution()} returns false, you should instead call {@code GooglePlayServicesUtil.getErrorDialog()}, passing it the error code. This returns a {@link -android.app.Dialog} provided by Google Play services that's appropriate for the given error. The -dialog may simply provide a message explaining the error, but it may also provide an action to -launch an activity that can resolve the error (such as when the user needs to install a newer -version of Google Play services).
- -For example, your -{@code onConnectionFailed()} callback method should now look like this:
- -
-public class MyActivity extends FragmentActivity
- implements ConnectionCallbacks, OnConnectionFailedListener {
-
- // Request code to use when launching the resolution activity
- private static final int REQUEST_RESOLVE_ERROR = 1001;
- // Unique tag for the error dialog fragment
- private static final String DIALOG_ERROR = "dialog_error";
- // Bool to track whether the app is already resolving an error
- private boolean mResolvingError = false;
-
- ...
-
- @Override
- public void onConnectionFailed(ConnectionResult result) {
- if (mResolvingError) {
- // Already attempting to resolve an error.
- return;
- } else if (result.hasResolution()) {
- try {
- mResolvingError = true;
- result.startResolutionForResult(this, REQUEST_RESOLVE_ERROR);
- } catch (SendIntentException e) {
- // There was an error with the resolution intent. Try again.
- mGoogleApiClient.connect();
- }
- } else {
- // Show dialog using GooglePlayServicesUtil.getErrorDialog()
- showErrorDialog(result.getErrorCode());
- mResolvingError = true;
- }
- }
-
- // The rest of this code is all about building the error dialog
-
- /* Creates a dialog for an error message */
- private void showErrorDialog(int errorCode) {
- // Create a fragment for the error dialog
- ErrorDialogFragment dialogFragment = new ErrorDialogFragment();
- // Pass the error that should be displayed
- Bundle args = new Bundle();
- args.putInt(DIALOG_ERROR, errorCode);
- dialogFragment.setArguments(args);
- dialogFragment.show(getSupportFragmentManager(), "errordialog");
- }
-
- /* Called from ErrorDialogFragment when the dialog is dismissed. */
- public void onDialogDismissed() {
- mResolvingError = false;
- }
-
- /* A fragment to display an error dialog */
- public static class ErrorDialogFragment extends DialogFragment {
- public ErrorDialogFragment() { }
-
- @Override
- public Dialog onCreateDialog(Bundle savedInstanceState) {
- // Get the error code and retrieve the appropriate dialog
- int errorCode = this.getArguments().getInt(DIALOG_ERROR);
- return GooglePlayServicesUtil.getErrorDialog(errorCode,
- this.getActivity(), REQUEST_RESOLVE_ERROR);
- }
-
- @Override
- public void onDismiss(DialogInterface dialog) {
- ((MainActivity)getActivity()).onDialogDismissed();
- }
- }
-}
-
-
-Once the user completes the resolution provided by {@code startResolutionForResult()} or {@code GooglePlayServicesUtil.getErrorDialog()}, your activity receives the {@link -android.app.Activity#onActivityResult onActivityResult()} callback with the {@link -android.app.Activity#RESULT_OK} -result code. You can then call {@code connect()} again. For example:
- -
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (requestCode == REQUEST_RESOLVE_ERROR) {
- mResolvingError = false;
- if (resultCode == RESULT_OK) {
- // Make sure the app is not already connected or attempting to connect
- if (!mGoogleApiClient.isConnecting() &&
- !mGoogleApiClient.isConnected()) {
- mGoogleApiClient.connect();
- }
- }
- }
-}
-
-
-In the above code, you probably noticed the boolean, {@code mResolvingError}. This keeps track of -the app state while the user is resolving the error to avoid repetitive attempts to resolve the -same error. For instance, while the account picker dialog is showing to resolve the {@code SIGN_IN_REQUIRED} error, the user may rotate the screen. This recreates your activity and causes -your {@link android.app.Activity#onStart onStart()} method to be called again, which then calls {@code connect()} again. This results in another call to {@code startResolutionForResult()}, which -creates another account picker dialog in front of the existing one.
- -This boolean is effective only -if retained across activity instances, though. The next section explains further.
- - - -To avoid executing the code in - -{@code onConnectionFailed()} while a previous attempt to resolve an -error is ongoing, you need to retain a boolean that tracks whether your app is already attempting -to resolve an error.
- -As shown in the code above, you should set a boolean to {@code true} each time you call {@code startResolutionForResult()} or display the dialog from {@code GooglePlayServicesUtil.getErrorDialog()}. Then when you -receive {@link android.app.Activity#RESULT_OK} in the {@link android.app.Activity#onActivityResult -onActivityResult()} callback, set the boolean to {@code false}.
- -To keep track of the boolean across activity restarts (such as when the user rotates the screen), -save the boolean in the activity's saved instance data using {@link -android.app.Activity#onSaveInstanceState onSaveInstanceState()}:
- -
-private static final String STATE_RESOLVING_ERROR = "resolving_error";
-
-@Override
-protected void onSaveInstanceState(Bundle outState) {
- super.onSaveInstanceState(outState);
- outState.putBoolean(STATE_RESOLVING_ERROR, mResolvingError);
-}
-
-
-Then recover the saved state during {@link android.app.Activity#onCreate onCreate()}:
- -
-@Override
-protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- ...
- mResolvingError = savedInstanceState != null
- && savedInstanceState.getBoolean(STATE_RESOLVING_ERROR, false);
-}
-
-
-Now you're ready to safely run your app and connect to Google Play services. -How you can perform read and write requests to any of the Google Play services -using {@code -GoogleApiClient} is discussed in the next section.
- -For more information about each services's APIs available once you're connected, -consult the corresponding documentation, such as for -Google Play Games or -Google Drive. -
- - -The Wearable API provides a communication channel for your handheld and wearable apps. The API -consists of a set of data objects that the system can send and synchronize over the wire and -listeners that notify your apps of important events with the data layer. The -{@code Wearable} -API is available on devices running Android 4.3 (API level 18) or higher when a wearable device is -connected. The API is not available under the following conditions: -
- -If your app uses the -{@code Wearable} -API but not other Google APIs, you can add this API by calling the -{@code addApi()} method. The following example shows how to add the -{@code Wearable} -API to your {@code -GoogleApiClient} instance:
- --GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this) - .addApi(Wearable.API) - .build(); -- -
In situations where the
-{@code Wearable}
-API is not available, connection requests that include the {@code
-Wearable} API fail with the
-API_UNAVAILABLE error code.
-The following example shows how to determine whether the -{@code Wearable} -API is available: -
- -
-// Connection failed listener method for a client that only
-// requests access to the Wearable API
-@Override
-public void onConnectionFailed(ConnectionResult result) {
- if (result.getErrorCode() == ConnectionResult.API_UNAVAILABLE) {
- // The Wearable API is unavailable
- }
- ...
-}
-
-
-
--If your app uses the -{@code Wearable} -API in addition to other Google APIs, call the -addApiIfAvailable() -method and pass in the -{@code Wearable} -API to indicate that your client should gracefully handle the missing API.
- -The following example shows how to access the -{@code Wearable} -API along with the -{@code Drive} -API:
- --// Create a GoogleApiClient instance -mGoogleApiClient = new GoogleApiClient.Builder(this) - .addApi(Drive.API) - .addApiIfAvailable(Wearable.API) - .addScope(Drive.SCOPE_FILE) - .addConnectionCallbacks(this) - .addOnConnectionFailedListener(this) - .build(); -- -
In the example above, the -{@code GoogleApiClient} -can successfully connect with the Google Drive service without connecting to the -{@code Wearable} -API if it is unavailable. After you connect your -{@code GoogleApiClient} -instance, ensure that the -{@code Wearable} -API is available before making the API calls: -
- --mGoogleApiClient.hasConnectedApi(Wearable.API); -- - -
Once connected, your client can make read and write calls using the service-specific APIs for which -your app is authorized, as specified by the APIs and scopes you added to your {@code -GoogleApiClient} instance.
- --Note: Before making calls to specific Google services, you may first need to -register your app in the Google Developer Console. For specific instructions, refer to the -appropriate getting started guide for the API you're using, such as Google Drive or Google+.
- -When you perform a read or write request using Google API Client, the immediate result is returned -as a {@code -PendingResult} object. This is an object representing the request, which hasn't yet -been delivered to the Google service.
- -For example, here's a request to read a file from Google Drive that provides a -{@code -PendingResult} object:
- --Query query = new Query.Builder() - .addFilter(Filters.eq(SearchableField.TITLE, filename)); -PendingResult result = Drive.DriveApi.query(mGoogleApiClient, query); -- -
Once you have the -{@code -PendingResult}, you can continue by making the request either asynchronous -or synchronous.
- - -To make the request asynchronous, call )" ->{@code setResultCallback()} on the -{@code -PendingResult} and -provide an implementation of the {@code ResultCallback} interface. For example, here's the request -executed asynchronously:
- -
-private void loadFile(String filename) {
- // Create a query for a specific filename in Drive.
- Query query = new Query.Builder()
- .addFilter(Filters.eq(SearchableField.TITLE, filename))
- .build();
- // Invoke the query asynchronously with a callback method
- Drive.DriveApi.query(mGoogleApiClient, query)
- .setResultCallback(new ResultCallback<DriveApi.MetadataBufferResult>() {
- @Override
- public void onResult(DriveApi.MetadataBufferResult result) {
- // Success! Handle the query result.
- ...
- }
- });
-}
-
-
-When your app receives a {@code Result} -object in the {@code onResult()} callback, it is delivered as an instance of the -appropriate subclass as specified by the API you're using, such as {@code DriveApi.MetadataBufferResult}.
- - -If you want your code to execute in a strictly defined order, perhaps because the result of one -call is needed as an argument to another, you can make your request synchronous by calling {@code await()} on the -{@code -PendingResult}. This blocks the thread and returns the {@code Result} object -when the request completes, which is delivered as an instance of the -appropriate subclass as specified by the API you're using, such as {@code DriveApi.MetadataBufferResult}.
- -Because calling {@code await()} blocks the thread until the result arrives, it's important that you -never perform this call on the UI thread. So, if you want to perform synchronous requests to a -Google Play service, you should create a new thread, such as with {@link android.os.AsyncTask} in -which to perform the request. For example, here's how to perform the same file request to Google -Drive as a synchronous call:
- -
-private void loadFile(String filename) {
- new GetFileTask().execute(filename);
-}
-
-private class GetFileTask extends AsyncTask<String, Void, Void> {
- protected void doInBackground(String filename) {
- Query query = new Query.Builder()
- .addFilter(Filters.eq(SearchableField.TITLE, filename))
- .build();
- // Invoke the query synchronously
- DriveApi.MetadataBufferResult result =
- Drive.DriveApi.query(mGoogleApiClient, query).await();
-
- // Continue doing other stuff synchronously
- ...
- }
-}
-
-
--Tip: You can also enqueue read requests while not connected to Google Play -services. For example, execute a method to read a file from Google Drive regardless of whether your -Google API Client is connected yet. Then once a connection is established, the read requests -execute and you'll receive the results. Any write requests, however, will generate an error if you -call them while your Google API Client is not connected.
- diff --git a/docs/html/google/auth/http-auth.jd b/docs/html/google/auth/http-auth.jd deleted file mode 100644 index 7d34d89d04bd4ff225cdf8b8ef61203796fdc581..0000000000000000000000000000000000000000 --- a/docs/html/google/auth/http-auth.jd +++ /dev/null @@ -1,558 +0,0 @@ -page.title=Authorizing with Google for REST APIs -page.tags="oauth 2.0","GoogleAuthUtil" - -trainingnavtop=true -startpage=true - -@jd:body - - -GoogleAuth.zip
-When you want your Android app to access Google APIs using the user's Google account over -HTTP, the {@code GoogleAuthUtil} -class and related APIs provide your users a secure and consistent experience for picking an -account and retrieving an OAuth 2.0 token for your app.
- -You can then use that token in your HTTP-based communications with Google API services -that are not included in the Google Play -services library, such as the Blogger or Translate APIs.
- -Note: An OAuth 2.0 token using {@code GoogleAuthUtil} -is required only for certain types of Google -APIs that you need to access over HTTP. If you're instead using the Google Play services library to access Google -APIs such as Google+ or Play Games, you don't need an OAuth 2.0 -token and you can instead access these services using the {@code GoogleApiClient}. For more -information, read Accessing Google Play -Services APIs.
- -To get started with {@code GoogleAuthUtil} -for accessing Google's REST APIs, you must set up your Android app project with the Google Play -services library. Follow the procedures in Setup Google Play Services SDK.
- - - - -Before you can publish an app that retrieves an OAuth 2.0 token for Google REST APIs, -you must register your Android app with the Google Cloud Console by providing your app's -package name and the SHA1 fingerprint of the keystore with which you sign your release APK.
- -Caution: While you are testing an APK that's signed with a -debug key, Google does not require that your app be registered in Google Cloud Console. However, -your app must be registered in Google Cloud Console in order to continue working once it is -signed -with a release key.
- -To register your Android app with Google Cloud Console:
- -Note: The name you provide for the project is the name that -appears to users in the Google Settings app in the list of Connected apps.
-To get the SHA1 fingerprint for your app, run the following command in a terminal: -
-keytool -exportcert -alias <keystore_alias> -keystore <keystore_path> -list -v --
For example, you're using a debug-key with Eclipse, then the command looks like this:
--keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v --
Then the keystore password is "android".
-The Credentials page then provides the available credentials such as an OAuth 2.0 client ID and -an Android Key, but you don't need these to authorize your Android users. Simply registering your -app with the package name and SHA1 makes the Google services accessible by your app. - - -
To acquire the OAuth 2.0 token that will grant you access to Google APIs over HTTP, you need to -first identify the user's Google account with which you'll query the servers. For this task, the -Google Play services library provides a convenient account picker dialog you can invoke using -{@code -AccountPicker}. The result delivered to your activity from the account picker is the account -name you'll use to request the OAuth 2.0 token in the next lesson.
- -Note: In order to use the APIs discussed here, you must -include the Google Play services library with your project. If you haven't set up your project -with the library yet, read the guide to Setup Google Play Services SDK.
- - - -To open the account picker dialog that's managed by the Google Play services library, call -{@link android.app.Activity#startActivityForResult startActivityForResult()} using an {@link -android.content.Intent} returned by -{@code AccountPicker.newChooseAccountIntent}.
- - -For example:
-
-static final int REQUEST_CODE_PICK_ACCOUNT = 1000;
-
-private void pickUserAccount() {
- String[] accountTypes = new String[]{"com.google"};
- Intent intent = AccountPicker.newChooseAccountIntent(null, null,
- accountTypes, false, null, null, null, null);
- startActivityForResult(intent, REQUEST_CODE_PICK_ACCOUNT);
-}
-
-
-When this code executes, a dialog appears for the user to pick an account. When the user -selects the account, your activity receives the result in the {@link -android.app.Activity#onActivityResult onActivityResult()} callback.
- -Most apps should pass the -{@code newChooseAccountIntent()} method the same arguments shown in the above example, -which indicate that:
- - -For more details about these arguments, see the -{@code newChooseAccountIntent()} method documentation.
- - - - -Once the user selects an account, your activity receives a call to its -{@link android.app.Activity#onActivityResult onActivityResult()} method. The received -{@link android.content.Intent} includes an extra for -{@link android.accounts.AccountManager#KEY_ACCOUNT_NAME}, specifying the account name -(an email address) you must use to acquire the OAuth 2.0 token.
- -Here's an example implementation of the callback {@link android.app.Activity#onActivityResult -onActivityResult()} that receives the selected account:
- -
-String mEmail; // Received from {@code newChooseAccountIntent()}; passed to {@code getToken()}
-
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (requestCode == REQUEST_CODE_PICK_ACCOUNT) {
- // Receiving a result from the AccountPicker
- if (resultCode == RESULT_OK) {
- mEmail = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
- // With the account name acquired, go get the auth token
- getUsername();
- } else if (resultCode == RESULT_CANCELED) {
- // The account picker dialog closed without selecting an account.
- // Notify users that they must pick an account to proceed.
- Toast.makeText(this, R.string.pick_account, Toast.LENGTH_SHORT).show();
- }
- }
- // Later, more code will go here to handle the result from some exceptions...
-}
-
-
-You can now pass the account name held by {@code mEmail} to -{@code GoogleAuthUtil.getToken()} (which is what the {@code getUsername()} method -does), but because it performs network transactions, this method should not be called from the -UI thread. The next lesson shows how to create an {@link android.os.AsyncTask} to get the auth token -on a separate thread.
- - -Once you have retrieved the account name for the user's Google account, you can call -{@code GoogleAuthUtil.getToken()}, which returns the access token string required by Google API -services.
- - -Calling this method is generally a straightforward procedure, but you must be -aware that:
-This lesson shows how you can gracefully handle these concerns by performing authentication in -an {@link android.os.AsyncTask} and providing users with the appropriate information and available -actions during known exceptions.
- -Note: The code shown in this lesson, using {@code GoogleAuthUtil.getToken()}, -is appropriate when you will be requesting the OAuth token from an {@link android.app.Activity}. -However, if you need to request the OAuth token from a {@link android.app.Service}, then you -should instead use {@code -getTokenWithNotification()}. This method works the same as {@code GoogleAuthUtil.getToken()}, but if an error occurs, it -also creates an appropriate -notification -that allows the user can recover from the error. -The sample available for download above includes code showing how to use this method instead.
- - -The {@link android.os.AsyncTask} class provides a simple way to create a worker thread for jobs -that should not run on your UI thread. This lesson focuses on how to create such a thread -to get your auth token; for a more complete discussion about {@link android.os.AsyncTask}, -read Keeping Your -App Responsive and the {@link android.os.AsyncTask} class reference.
- - -The {@link android.os.AsyncTask#doInBackground doInBackground()} method in your {@link -android.os.AsyncTask} class is where you should call the -{@code GoogleAuthUtil.getToken()} method. You can also use it to catch some of the generic -exceptions that may occur during your network transactions.
- -For example, here's part of an {@link android.os.AsyncTask} subclass that calls -{@code GoogleAuthUtil.getToken()}:
- --public class GetUsernameTask extends AsyncTask- -{ - Activity mActivity; - String mScope; - String mEmail; - - GetUsernameTask(Activity activity, String name, String scope) { - this.mActivity = activity; - this.mScope = scope; - this.mEmail = name; - } - - /** - * Executes the asynchronous job. This runs when you call execute() - * on the AsyncTask instance. - */ - @Override - protected Void doInBackground(Void... params) { - try { - String token = fetchToken(); - if (token != null) { - // Insert the good stuff here. - // Use the token to access the user's Google data. - ... - } - } catch (IOException e) { - // The fetchToken() method handles Google-specific exceptions, - // so this indicates something went wrong at a higher level. - // TIP: Check for network connectivity before starting the AsyncTask. - ... - } - return null; - } - - /** - * Gets an authentication token from Google and handles any - * GoogleAuthException that may occur. - */ - protected String fetchToken() throws IOException { - try { - return GoogleAuthUtil.getToken(mActivity, mEmail, mScope); - } catch (UserRecoverableAuthException userRecoverableException) { - // GooglePlayServices.apk is either old, disabled, or not present - // so we need to show the user some UI in the activity to recover. - mActivity.handleException(userRecoverableException); - } catch (GoogleAuthException fatalException) { - // Some other type of unrecoverable exception has occurred. - // Report and log the error as appropriate for your app. - ... - } - return null; - } - ... -} -
In order to call -{@code GoogleAuthUtil.getToken()}, you must provide the app {@link android.content.Context}, -the account name retrieved from the account picker, and the scope for your auth -token request. The above sample code (and the attached sample) defines these -arguments with class members that the host activity passes to the {@link android.os.AsyncTask} class constructor. For more information about setting the scope, see -the Specifying Scopes section below.
- -Note: -As shown by the {@code fetchToken()} method above, you must handle -special exceptions that may occur during the -{@code GoogleAuthUtil.getToken()} method. The next section shows how you should -respond to these exceptions.
- -Once you have an {@link android.os.AsyncTask} subclass defined, -you can instantiate and execute an instance after you get the user's -account name from the account picker. -For example, back in the {@link android.app.Activity} class you can do something like this:
- -
-String mEmail; // Received from {@code newChooseAccountIntent()}; passed to {@code getToken()}
-private static final String SCOPE =
- "oauth2:https://www.googleapis.com/auth/userinfo.profile";
-
-/**
- * Attempts to retrieve the username.
- * If the account is not yet known, invoke the picker. Once the account is known,
- * start an instance of the AsyncTask to get the auth token and do work with it.
- */
-private void getUsername() {
- if (mEmail == null) {
- pickUserAccount();
- } else {
- if (isDeviceOnline()) {
- new GetUsernameTask(HelloActivity.this, mEmail, SCOPE).execute();
- } else {
- Toast.makeText(this, R.string.not_online, Toast.LENGTH_LONG).show();
- }
- }
-}
-
-
-The {@code pickUserAccount()} method is shown in the first lesson, Picking the User's Account. - -
For information about how to check whether the device is currently online (as performed by -the {@code isDeviceOnline()} method above), see the attached sample app or the -Connecting to the Network lesson.
- -The only part left is how you should handle the exceptions that may occur when you call - -{@code GoogleAuthUtil.getToken()}.
- -The scope string is used to specify which Google services can be accessed by - an app using the requested auth token. An auth token can be associated with - multiple scopes.
-When specifying the scopes in your auth token request, prefix the - scope string with {@code "oauth2:"} followed by a list of one or more OAuth scope - values. Use a space to separate each scope value in the list. To see a list of - valid OAuth scope values for Google services, browse - the OAuth 2.0 Playground.
-Tip: Specify {@code "oauth2:<scope>"} - for a single scope. Specify - {@code "oauth2:<scope1> <scope2> <scopeN>"} for multiple - scopes (using a space to separate each scope).
-For example, to access the Google Books API, the scope is - {@code "oauth2:https://www.googleapis.com/auth/books"}. To add an additional - scope, say for Google+ login, your code might look like this:
--private final static String BOOKS_API_SCOPE - = "https://www.googleapis.com/auth/books"; -private fina; static String GPLUS_SCOPE - = "https://www.googleapis.com/auth/plus.login"; -private final static String mScopes - = "oauth2:" + BOOKS_API_SCOPE + " " + GPLUS_SCOPE; -String token = GoogleAuthUtil.getToken(mActivity, mEmail, mScopes); -- -
As shown in the fetchToken() method above, you must catch all occurrences of {@code
-GoogleAuthException} when you call
-{@code GoogleAuthUtil.getToken()}.
To provide users information and a proper solution to issues that may occur while acquiring the -auth token, it's important that you properly handle the following subclasses of {@code -GoogleAuthException}:
- - -For example, the fetchToken() method in the above sample code catches any
-occurrence of {@code
-UserRecoverableAuthException} and passes it back to the activity with a method called
-{@code handleException()}. Here's what that method in the activity may look like:
-static final int REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR = 1001;
-
-/**
- * This method is a hook for background threads and async tasks that need to
- * provide the user a response UI when an exception occurs.
- */
-public void handleException(final Exception e) {
- // Because this call comes from the AsyncTask, we must ensure that the following
- // code instead executes on the UI thread.
- runOnUiThread(new Runnable() {
- @Override
- public void run() {
- if (e instanceof GooglePlayServicesAvailabilityException) {
- // The Google Play services APK is old, disabled, or not present.
- // Show a dialog created by Google Play services that allows
- // the user to update the APK
- int statusCode = ((GooglePlayServicesAvailabilityException)e)
- .getConnectionStatusCode();
- Dialog dialog = GooglePlayServicesUtil.getErrorDialog(statusCode,
- HelloActivity.this,
- REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);
- dialog.show();
- } else if (e instanceof UserRecoverableAuthException) {
- // Unable to authenticate, such as when the user has not yet granted
- // the app access to the account, but the user can fix this.
- // Forward the user to an activity in Google Play services.
- Intent intent = ((UserRecoverableAuthException)e).getIntent();
- startActivityForResult(intent,
- REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR);
- }
- }
- });
-}
-
-
-Notice that in both cases, the {@code REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR} -request code is passed with the request to handle the exception with a dialog or activity. -This way, when the user completes the appropriate action to resolve the exception, -your {@link android.app.Activity#onActivityResult onActivityResult()} method receives an -intent that includes this request code and you can try to acquire the auth -token again.
- - -For example, the following code is a complete implementation of {@link -android.app.Activity#onActivityResult onActivityResult()} that handles results for -both the {@code REQUEST_CODE_PICK_ACCOUNT} action (shown in the previous lesson, Picking the User's Account) -and the {@code REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR} action, which occurs after the user -completes one of the actions above to resolve an exception.
- - -
-@Override
-protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (requestCode == REQUEST_CODE_PICK_ACCOUNT) {
- // Receiving a result from the AccountPicker
- if (resultCode == RESULT_OK) {
- mEmail = data.getStringExtra(AccountManager.KEY_ACCOUNT_NAME);
- // With the account name acquired, go get the auth token
- getUsername();
- } else if (resultCode == RESULT_CANCELED) {
- // The account picker dialog closed without selecting an account.
- // Notify users that they must pick an account to proceed.
- Toast.makeText(this, R.string.pick_account, Toast.LENGTH_SHORT).show();
- }
- } else if ((requestCode == REQUEST_CODE_RECOVER_FROM_AUTH_ERROR ||
- requestCode == REQUEST_CODE_RECOVER_FROM_PLAY_SERVICES_ERROR)
- && resultCode == RESULT_OK) {
- // Receiving a result that follows a GoogleAuthException, try auth again
- getUsername();
- }
-}
-
-
-For a complete set of code that acquires the OAuth token and queries a Google service -over HTTP (including how to use {@code -getTokenWithNotification()} when you need to acquire the token from -a {@link android.app.Service}), see the sample app available for download at the top -of this page.
- - - diff --git a/docs/html/google/play-services/auth.jd b/docs/html/google/play-services/auth.jd deleted file mode 100644 index dded5998c282d02be3747791aa4a7c6c91697a21..0000000000000000000000000000000000000000 --- a/docs/html/google/play-services/auth.jd +++ /dev/null @@ -1,239 +0,0 @@ -page.title=Authorization -page.tags=AccountManager,oauth2 -@jd:body - -- Google Play services offers a standard authorization flow for all Google APIs and - all components of Google Play services. In addition, you can leverage the authorization - portion of the Google Play services SDK to gain authorization to services that are not yet supported - in the Google Play services platform by using the access token to manually make API - requests or using a client library provided by the service provider. -
- -For implementation details, see the sample in <android-sdk>/extras/google-play-services/samples/auth,
-which shows you how to carry out these basic steps for obtaining an access token.
- Google Play services leverage existing accounts on an Android-powered device - to gain authorization to the services that you want to use. To obtain an access token, - a valid Google account is required and it must exist on the device. You can ask your users which - account they want to use by enumerating the Google accounts on the device or using the - built-in -{@code -AccountPicker} - class to display a standard account picker view. You'll need the - {@link android.Manifest.permission#GET_ACCOUNTS} - permission set in your manifest file for both methods. -
-- For example, here's how to gather all of the Google accounts on a device and return them - in an array. When obtaining an access token, only the email address of the account is - needed, so that is what the array stores: -
- -
-private String[] getAccountNames() {
- mAccountManager = AccountManager.get(this);
- Account[] accounts = mAccountManager.getAccountsByType(
- GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE);
- String[] names = new String[accounts.length];
- for (int i = 0; i < names.length; i++) {
- names[i] = accounts[i].name;
- }
- return names;
-}
-
-- With an email address and the service scope you can now obtain an access token. -
-Note: Specify "oauth2:scope" for a single scope or
- "oauth2:scope1 scope2 scope3" for multiple scopes.
-HelloActivity mActivity;
-String mEmail;
-String mScope;
-String token;
-
-...
-try {
- token = GoogleAuthUtil.getToken(mActivity, mEmail, mScope);
-} catch {
- ...
-}
-
-
-Call this method off of the main UI thread since it executes network transactions. An easy way to do this - 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 authorization is successful, the token is returned. If not, the exceptions described in -Handling Exceptions - are thrown that you can catch and handle appropriately. -
- -If you are obtaining access tokens in a background service or sync adapter, there - are three overloaded - {@code getTokenWithNotification()} methods - that you can use:
-android:exported
- attribute to true for the broadcast receiversyncBundle parameter.See the sample in <android-sdk>/extras/google-play-services/samples/auth for implementation details.
- When requesting an access token with - {@code GoogleAuthUtil.getToken()}, - the following exceptions can be thrown: -
-- For more information on how to handle these exceptions and code snippets, see the reference - documentation for the -{@code -GoogleAuthUtil} class. -
- - - - -- Once you have successfully obtained a token, you can use it to access Google services. - Many Google services provide client libraries, so it is recommended that you use these when - possible, but you can make raw HTTP requests as well with the token. The following example - shows you how to do this and handle HTTP error and success responses accordingly: -
- -
-URL url = new URL("https://www.googleapis.com/oauth2/v1/userinfo?access_token="
- + token);
-HttpURLConnection con = (HttpURLConnection) url.openConnection();
-int serverCode = con.getResponseCode();
-//successful query
-if (serverCode == 200) {
- InputStream is = con.getInputStream();
- String name = getFirstName(readResponse(is));
- mActivity.show("Hello " + name + "!");
- is.close();
- return;
-//bad token, invalidate and get a new one
-} else if (serverCode == 401) {
- GoogleAuthUtil.invalidateToken(mActivity, token);
- onError("Server auth error, please try again.", null);
- Log.e(TAG, "Server auth error: " + readResponse(con.getErrorStream()));
- return;
-//unknown error, do something else
-} else {
- Log.e("Server returned the following error code: " + serverCode, null);
- return;
-}
-
-
-- Notice that you must manually invalidate the token if the response from the server - signifies an authorization error (401). This could mean the access 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 {@code GoogleAuthUtil.getToken()}. -
diff --git a/docs/html/google/play-services/index.jd b/docs/html/google/play-services/index.jd deleted file mode 100644 index 11060e8448e44077b02c808b08c0c4fbd3ebe21c..0000000000000000000000000000000000000000 --- a/docs/html/google/play-services/index.jd +++ /dev/null @@ -1,706 +0,0 @@ -page.title=Google Play Services -header.hide=1 -page.metaDescription=With Google Play services, your app can take advantage of the latest Google-powered features such as Maps, Analytics, and more: platform updates are distributed automatically as an APK through the Google Play Store. - -@jd:body - -
-Give your apps more features to attract users - on a wider range of devices. - With Google Play services, your app can take advantage - of the latest, Google-powered features such as Maps, Google+, and more, - with automatic platform updates distributed as an APK through - the Google Play store. This makes it faster for your users to receive updates - and easier for you to integrate the newest that Google has to offer. -
- -Google Play services provides you with easy access to Google services and is -tightly integrated with the Android OS. Easy-to-use client libraries are -provided for each service that let you implement the functionality you want -easier and faster.
- -All products in Google Play services share a common authorization API - that leverages the existing Google accounts on the device. You and your - users have a consistent and safe way to grant and receive OAuth2 access tokens - to Google services.
- -Devices running Android 2.3 or higher that have the Google Play Store -app will automatically receive updates to Google Play services. Enhance -your app with the most recent version of Google Play services without worrying -about your users' Android version.
- -To start integrating Google Play services into your app, - follow the Setup guide.
-
-
Google Play services, Version 7.3 (April 2015)
-
For a summary of the feature highlights in Google Play services 7.3, see the -announcement -blog post.
-
-
Google Play services, Version 7.0 (March 2015)
-
For a summary of the feature highlights in Google Play services 7.0, see the -announcement -blog post.
-
-
Google Play services, Version 6.5 (December 2014)
-
For a summary of the feature highlights in Google Play services 6.5, see the -announcement -blog post.
-Note: Use of the Donate with Google - button is limited to 501(c)(3) organizations. For more information, see the - Content policies.
- -Use these APIs instead of the deprecated APIs:
-
-
Google Play services, Version 6.1 (October 2014)
-
For a summary of the feature highlights in Google Play services 6.1, see the -announcement -blog post.
-CompletionEvent class to notify you when actions are
- committed to the server and respond to conflicts. Recent and starred views
- are now available in the file picker user interface provided by
-
- OpenFileActivityBuilder, and the user interface has been
- updated to use
- material design. A new
-
- DriveResource.setParents() method makes it possible to organize files
- and folders. In addition, the
-
- Contents
- class has been replaced with a
-
- DriveContents class that simplifies working with file
- contents.
-
-
-
Google Play services, Version 5.0 (July 2014)
-
For a summary of the feature highlights in Google Play services 5.0, see the -announcement -blog post.
-
-
Google Play services, Version 4.4 (May 2014)
-
For a summary of the feature highlights in Google Play services 4.4, see the -announcement blog post.
-
-
Google Play services, Version 4.3 (March 2014)
-
For a summary of the feature highlights in Google Play services 4.3, see the -announcement blog post.
-- The client library contains the interfaces to the individual Google - services and allows you to obtain authorization from users to gain access - to these services with their credentials. It also contains APIs that allow - you to resolve any issues at runtime, such as a missing, disabled, or out-of-date - Google Play services APK. The client library has a light footprint if you use - ProGuard as part of your build process, so it won't have - an adverse impact on your app's file size. -
-- If you want to access added features or products, you can upgrade to a new version of the - client library as they are released. However, upgrading is not - necessary if you don't care about new features or bug fixes. - We anticipate more Google services to be continuously added, so be on the lookout for - these updates. -
- -- The Google Play services APK contains the individual Google services and runs - as a background service in the Android OS. You interact with the background service - through the client library and the service carries out the actions on your behalf. - An easy-to-use authorization flow is also - provided to gain access to the each Google service, which provides consistency for both - you and your users. -
-- The Google Play services APK is delivered through the Google Play Store, so - updates to the services are not dependent on carrier or OEM system image updates. In general, devices - running Android 2.3 (Gingerbread) or later and have the Google Play Store app installed receive updates within a - few days. This allows you to use the newest APIs in Google Play services and reach most of the - devices in the Android ecosystem (devices older than Android 2.3 or devices without the Google - Play Store app are not supported). -
-
- The Google Play services APK on user devices receives regular updates - for new APIs, features, and bug fixes.
-Google Play services gives you the freedom to use the newest APIs for popular -Google services without worrying about device support. Updates to Google Play -services are distributed automatically by the Google Play Store and new versions -of the client library are delivered through the Android SDK Manager. This makes it -easy for you to focus on what's important: your users' experience.
- -To get started, set up the SDK and check out -the various products in the Google Play services platform now!
diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd deleted file mode 100644 index 313e59118eab44522f323381b3657876bcb97df1..0000000000000000000000000000000000000000 --- a/docs/html/google/play-services/setup.jd +++ /dev/null @@ -1,398 +0,0 @@ -page.title=Setting Up Google Play Services -@jd:body - - - -To develop an app using the Google -Play services APIs, you need to set up your project with the Google Play services SDK. -
If you haven't installed the Google Play services SDK yet, go get it now by following the guide -to Adding SDK Packages.
- -To test your app when using the Google Play services SDK, you must use either:
-- -
- - -To make the Google Play services APIs available to your app:
-build.gradle file inside your application module directory.
- Note: Android Studio projects contain a top-level
- build.gradle file and a build.gradle file for each module.
- Be sure to edit the file for your application module. See
- Building Your Project with
- Gradle for more information about Gradle.
dependencies for the latest version of
-play-services. For example:
-
-apply plugin: 'com.android.application'
-...
-
-dependencies {
- compile 'com.android.support:appcompat-v7:21.0.3'
- compile 'com.google.android.gms:play-services:7.3.0'
-}
-
-Be sure you update this version number each time Google Play services is updated.
-Note: If the number of method references in your app exceeds the -65K limit, your app may fail to compile. You -may be able to mitigate this problem when compiling your app by specifying only the specific Google -Play services APIs your app uses, instead of all of them. For information on how to do this, -see Selectively compiling APIs into your executable. - -
-in the toolbar.
- You can now begin developing features with the -Google Play services APIs.
- -In versions of Google Play services prior to 6.5, you had to compile the entire package of APIs -into your app. In some cases, doing so made it more difficult to keep the number of methods -in your app (including framework APIs, library methods, and your own code) under the 65,536 limit.
- -From version 6.5, you can instead selectively compile Google Play service APIs into your app. For
-example, to include only the Google Fit and Android Wear APIs, replace the following line in your
-build.gradle file:
-compile 'com.google.android.gms:play-services:7.3.0' -- -
with these lines:
- --compile 'com.google.android.gms:play-services-fitness:7.3.0' -compile 'com.google.android.gms:play-services-wearable:7.3.0' -- -
Table 1 shows a list of the separate APIs that you can include when compiling your app, and
-how to describe them in your build.gradle file. Some APIs do not have a separate
-library; include them by including the base library. (This lib is automatically included when
-you include an API that does have a separate library.)
-Table 1. Individual APIs and corresponding build.gradle descriptions.
| Google Play services API | -Description in build.gradle |
-
|---|---|
| Google+ | -com.google.android.gms:play-services-plus:7.3.0 | -
| Google Account Login | -com.google.android.gms:play-services-identity:7.3.0 | -
| Google Actions, Base Client Library | -com.google.android.gms:play-services-base:7.3.0 | -
| Google App Indexing | -com.google.android.gms:play-services-appindexing:7.3.0 | -
| Google Analytics | -com.google.android.gms:play-services-analytics:7.3.0 | -
| Google Cast | -com.google.android.gms:play-services-cast:7.3.0 | -
| Google Cloud Messaging | -com.google.android.gms:play-services-gcm:7.3.0 | -
| Google Drive | -com.google.android.gms:play-services-drive:7.3.0 | -
| Google Fit | -com.google.android.gms:play-services-fitness:7.3.0 | -
| Google Location, Activity Recognition, and Places | -com.google.android.gms:play-services-location:7.3.0 | -
| Google Maps | -com.google.android.gms:play-services-maps:7.3.0 | -
| Google Mobile Ads | -com.google.android.gms:play-services-ads:7.3.0 | -
| Google Nearby | -com.google.android.gms:play-services-nearby:7.3.0 | -
| Google Panorama Viewer | -com.google.android.gms:play-services-panorama:7.3.0 | -
| Google Play Game services | -com.google.android.gms:play-services-games:7.3.0 | -
| SafetyNet | -com.google.android.gms:play-services-safetynet:7.3.0 | -
| Google Wallet | -com.google.android.gms:play-services-wallet:7.3.0 | -
| Android Wear | -com.google.android.gms:play-services-wearable:7.3.0 | -
Note: ProGuard directives are included in the Play services
-client libraries to preserve the required classes. The
-Android Plugin for Gradle
-automatically appends ProGuard configuration files in an AAR (Android ARchive) package and appends
-that package to your ProGuard configuration. During project creation, Android Studio automatically
-creates the ProGuard configuration files and build.gradle properties for ProGuard use.
-To use ProGuard with Android Studio, you must enable the ProGuard setting in your
-build.gradle buildTypes. For more information, see the
-ProGuard topic.
To make the Google Play services APIs available to your app:
-Note: You should be referencing a copy of the - library that you copied to your development workspace—you should not - reference the library directly from the Android SDK directory.
--<meta-data android:name="com.google.android.gms.version" - android:value="@integer/google_play_services_version" /> --
Once you've set up your project to reference the library project, -you can begin developing features with the -Google Play services APIs.
- - -To prevent ProGuard from stripping away
-required classes, add the following lines in the
-<project_directory>/proguard-project.txt file:
-
--keep class * extends java.util.ListResourceBundle {
- protected Object[][] getContents();
-}
-
--keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
- public static final *** NULL;
-}
-
--keepnames @com.google.android.gms.common.annotation.KeepName class *
--keepclassmembernames class * {
- @com.google.android.gms.common.annotation.KeepName *;
-}
-
--keepnames class * implements android.os.Parcelable {
- public static final ** CREATOR;
-}
-
-
-
-
-To make the Google Play services APIs available to your app:
-Note: -You should be referencing a copy of the library that you copied to your development -workspace—you should not reference the library directly from the Android SDK directory.
--<meta-data android:name="com.google.android.gms.version" - android:value="@integer/google_play_services_version" /> --
Once you've set up your project to reference the library project, -you can begin developing features with the -Google Play services APIs.
- - -To prevent ProGuard from stripping away
-required classes, add the following lines in the
-<project_directory>/proguard-project.txt file:
-
--keep class * extends java.util.ListResourceBundle {
- protected Object[][] getContents();
-}
-
--keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
- public static final *** NULL;
-}
-
--keepnames @com.google.android.gms.common.annotation.KeepName class *
--keepclassmembernames class * {
- @com.google.android.gms.common.annotation.KeepName *;
-}
-
--keepnames class * implements android.os.Parcelable {
- public static final ** CREATOR;
-}
-
-
-
-As described in the Google Play services -introduction, Google Play delivers service updates for users on -Android 2.3 and higher through the Google Play Store app. However, updates might not reach -all users immediately, so your app should verify the version available before attempting to -perform API transactions.
- --Important: - Because it is hard to anticipate the state of each device, you must always check for a - compatible Google Play services APK before you access Google Play services - features. -
- -Because each app uses Google Play services differently, it's up to you decide the appropriate -place in your app to verify the Google Play services version. For example, if Google Play -services is required for your app at all times, you might want to do it when your app first -launches. On the other hand, if Google Play services is an optional part of your app, you can check -the version only once the user navigates to that portion of your app.
- -You are strongly encouraged to use the - -{@code GoogleApiClient} class to access Google Play services features. This approach allows -you to attach an - -{@code OnConnectionFailedListener} object to your client. -To detect if the device has the appropriate version of the Google Play services APK, implement the - -{@code onConnectionFailed()} -callback method. If the connection fails due to a missing or out-of-date version of -the Google Play APK, the callback receives an error code such as - -{@code SERVICE_MISSING}, - -{@code SERVICE_VERSION_UPDATE_REQUIRED}, or - -{@code SERVICE_DISABLED}. To learn more about how to build your client and handle such -connection errors, see Accessing Google APIs. -
- -Another approach is to use the -{@code isGooglePlayServicesAvailable()} method. You might call this method in the -{@link android.app.Activity#onResume onResume()} method of the main activity. If the result code is -{@code SUCCESS}, - then the Google Play services APK is up-to-date and you can continue to make a connection. -If, however, the result code is -{@code SERVICE_MISSING}, -{@code SERVICE_VERSION_UPDATE_REQUIRED}, - or -{@code SERVICE_DISABLED}, then the user needs to install an update. In this case, call the - -{@code getErrorDialog()} method and pass it the result error code. The method returns a -{@link android.app.Dialog} you should show, which provides an appropriate message about the error -and provides an action that takes the user to Google Play Store to install the update.
- - -To then begin a connection to Google Play services (required by most Google APIs such -as Google Drive, Google+, and Games), read Accessing Google APIs.
diff --git a/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html b/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html deleted file mode 100644 index 5ef2947a803f512acb070f6aff9bfd568526f0b4..0000000000000000000000000000000000000000 --- a/docs/html/reference/com/google/android/gcm/GCMBaseIntentService.html +++ /dev/null @@ -1,6576 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -| java.lang.Object | -|||||
| ↳ | - -android.content.Context | -||||
| - - | ↳ | - -android.content.ContextWrapper | -|||
| - - | - - | ↳ | - -android.app.Service | -||
| - - | - - | - - | ↳ | - -android.app.IntentService | -|
| - - | - - | - - | - - | ↳ | - -com.google.android.gcm.GCMBaseIntentService | -
-
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
-
-
Skeleton for application-specific IntentServices responsible for
- handling communication from Google Cloud Messaging service.
-
- The abstract methods in this class are called from its worker thread, and - hence should run in a limited amount of time. If they execute long - operations, they should spawn new threads, otherwise the worker thread will - be blocked. -
- Subclasses must provide a public no-arg constructor.
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -TAG | -Old TAG used for logging. | -|||||||||
|
- [Expand]
- Inherited Constants | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- From class
-android.app.Service
-
-
-
-
-
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
- From class
-android.content.Context
-
-
-
-
-
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
- From interface
-android.content.ComponentCallbacks2
-
-
-
-
-
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Protected Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constructor that does not set a sender id, useful when the sender id
- is context-specific.
-
- | |||||||||||
Constructor used when the sender id(s) is fixed.
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the sender ids.
-
- | |||||||||||
Called when the GCM server tells pending messages have been deleted
- because the device was idle.
-
- | |||||||||||
Called on registration or unregistration error.
-
- | |||||||||||
Called when a cloud message has been received.
-
- | |||||||||||
Called on a registration error that could be retried.
-
- | |||||||||||
Called after a device has been registered.
-
- | |||||||||||
Called after a device has been unregistered.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- android.app.IntentService
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- android.app.Service
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- android.content.ContextWrapper
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- android.content.Context
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.content.ComponentCallbacks
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.content.ComponentCallbacks2
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Old TAG used for logging. Marked as deprecated since it should have - been private at first place. -
Constructor that does not set a sender id, useful when the sender id - is context-specific. -
- When using this constructor, the subclass must
- override getSenderIds(Context), otherwise methods such as
- onHandleIntent(Intent) will throw an
- IllegalStateException on runtime.
-
Constructor used when the sender id(s) is fixed. -
Gets the sender ids. - -
By default, it returns the sender ids passed in the constructor, but - it could be overridden to provide a dynamic sender id.
| IllegalStateException - | if sender id was not set on constructor. - | -
|---|
Called when the GCM server tells pending messages have been deleted - because the device was idle.
| context - | application's context. | -
|---|---|
| total - | total number of collapsed messages - | -
Called on registration or unregistration error.
| context - | application's context. | -
|---|---|
| errorId - | error id returned by the GCM service. - | -
Called when a cloud message has been received.
| context - | application's context. | -
|---|---|
| intent - | intent containing the message payload as extras. - | -
Called on a registration error that could be retried. - -
By default, it does nothing and returns true, but could be - overridden to change that behavior and/or display the error.
| context - | application's context. | -
|---|---|
| errorId - | error id returned by the GCM service. | -
Called after a device has been registered.
| context - | application's context. | -
|---|---|
| registrationId - | the registration id returned by the GCM service. - | -
Called after a device has been unregistered.
| context - | application's context. - | -
|---|---|
| registrationId - | the registration id that was previously registered. | -
- About Android | - Legal | - Support -
-| java.lang.Object | -||
| ↳ | - -android.content.BroadcastReceiver | -|
| - - | ↳ | - -com.google.android.gcm.GCMBroadcastReceiver | -
-
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
-
-
BroadcastReceiver that receives GCM messages and delivers them to
- an application-specific GCMBaseIntentService subclass.
-
- By default, the GCMBaseIntentService class belongs to the application
- main package and is named
- DEFAULT_INTENT_SERVICE_CLASS_NAME. To use a new class,
- the getGCMIntentServiceClassName(Context) must be overridden.
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the class name of the intent service that will handle GCM messages.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- android.content.BroadcastReceiver
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||
Gets the class name of the intent service that will handle GCM messages. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.GCMConstants | -
-
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
-
-
Constants used by the GCM library.
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -DEFAULT_INTENT_SERVICE_CLASS_NAME | -- | |||||||||
| String | -ERROR_ACCOUNT_MISSING | -There is no Google account on the phone. | -|||||||||
| String | -ERROR_AUTHENTICATION_FAILED | -Bad password. | -|||||||||
| String | -ERROR_INVALID_PARAMETERS | -The request sent by the phone does not contain the expected parameters. | -|||||||||
| String | -ERROR_INVALID_SENDER | -The sender account is not recognized. | -|||||||||
| String | -ERROR_PHONE_REGISTRATION_ERROR | -Incorrect phone registration with Google. | -|||||||||
| String | -ERROR_SERVICE_NOT_AVAILABLE | -The device can't read the response, or there was a 500/503 from the - server that can be retried later. | -|||||||||
| String | -EXTRA_APPLICATION_PENDING_INTENT | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION
- to get the application info. |
- |||||||||
| String | -EXTRA_ERROR | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate an error when the registration fails. |
- |||||||||
| String | -EXTRA_FROM | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE
- to indicate which sender (Google API project id) sent the message. |
- |||||||||
| String | -EXTRA_REGISTRATION_ID | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate the registration id when the registration succeeds. |
- |||||||||
| String | -EXTRA_SENDER | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION
- to indicate which senders (Google API project ids) can send messages to
- the application. |
- |||||||||
| String | -EXTRA_SPECIAL_MESSAGE | -Type of message present in the
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE
- intent. |
- |||||||||
| String | -EXTRA_TOTAL_DELETED | -Number of messages deleted by the server because the device was idle. | -|||||||||
| String | -EXTRA_UNREGISTERED | -Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate that the application has been unregistered. |
- |||||||||
| String | -INTENT_FROM_GCM_LIBRARY_RETRY | -Intent used by the GCM library to indicate that the registration call - should be retried. | -|||||||||
| String | -INTENT_FROM_GCM_MESSAGE | -Intent sent by GCM containing a message. | -|||||||||
| String | -INTENT_FROM_GCM_REGISTRATION_CALLBACK | -Intent sent by GCM indicating with the result of a registration request. | -|||||||||
| String | -INTENT_TO_GCM_REGISTRATION | -Intent sent to GCM to register the application. | -|||||||||
| String | -INTENT_TO_GCM_UNREGISTRATION | -Intent sent to GCM to unregister the application. | -|||||||||
| String | -PERMISSION_GCM_INTENTS | -Permission necessary to receive GCM intents. | -|||||||||
| String | -VALUE_DELETED_MESSAGES | -Special message indicating the server deleted the pending messages. | -|||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
There is no Google account on the phone. The application should ask the - user to open the account manager and add a Google account. -
Bad password. The application should ask the user to enter his/her - password, and let user retry manually later. Fix on the device side. -
The request sent by the phone does not contain the expected parameters. - This phone doesn't currently support GCM. -
The sender account is not recognized. Fix on the device side. -
Incorrect phone registration with Google. This phone doesn't currently - support GCM. -
The device can't read the response, or there was a 500/503 from the - server that can be retried later. The application should use exponential - back off and retry. -
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION
- to get the application info.
-
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate an error when the registration fails.
- See constants starting with ERROR_ for possible values.
-
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE
- to indicate which sender (Google API project id) sent the message.
-
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate the registration id when the registration succeeds.
-
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_TO_GCM_REGISTRATION
- to indicate which senders (Google API project ids) can send messages to
- the application.
-
Type of message present in the
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE
- intent.
- This extra is only set for special messages sent from GCM, not for
- messages originated from the application.
-
Number of messages deleted by the server because the device was idle.
- Present only on messages of special type
- com.google.android.gcm.GCMConstants.VALUE_DELETED_MESSAGES
-
Extra used on
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK
- to indicate that the application has been unregistered.
-
Intent used by the GCM library to indicate that the registration call - should be retried. -
Intent sent by GCM containing a message. -
Intent sent by GCM indicating with the result of a registration request. -
Intent sent to GCM to register the application. -
Intent sent to GCM to unregister the application. -
Permission necessary to receive GCM intents. -
Special message indicating the server deleted the pending messages. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.GCMRegistrar | -
-
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
-
-
Utilities for device registration. -
- Note: this class uses a private SharedPreferences
- object to keep track of the registration token.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| long | -DEFAULT_ON_SERVER_LIFESPAN_MS | -Default lifespan (7 days) of the isRegisteredOnServer(Context)
- flag until it is considered expired. |
- |||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Checks if the device has the proper dependencies installed.
-
- | |||||||||||
Checks that the application manifest is properly configured.
-
- | |||||||||||
Gets how long (in milliseconds) the
-
- isRegistered(Context)
- property is valid. | |||||||||||
Gets the current registration id for application on GCM service.
-
- | |||||||||||
Checks whether the application was successfully registered on GCM
- service.
-
- | |||||||||||
Checks whether the device was successfully registered in the server side,
- as set by
-
- setRegisteredOnServer(Context, boolean). | |||||||||||
Clear internal resources.
-
- | |||||||||||
Initiate messaging registration for the current application.
-
- | |||||||||||
Sets how long (in milliseconds) the
-
- isRegistered(Context)
- flag is valid. | |||||||||||
Sets whether the device was successfully registered in the server side.
-
- | |||||||||||
Unregister the application.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Default lifespan (7 days) of the isRegisteredOnServer(Context)
- flag until it is considered expired.
-
Checks if the device has the proper dependencies installed. -
- This method should be called when the application starts to verify that - the device supports GCM.
| context - | application context. | -
|---|
| UnsupportedOperationException - | if the device does not support GCM. - | -
|---|
Checks that the application manifest is properly configured. -
- A proper configuration means: -
PACKAGE_NAME.permission.C2D_MESSAGE.
- BroadcastReceiver with category
- PACKAGE_NAME.
- BroadcastReceiver(s) uses the
- com.google.android.gcm.GCMConstants.PERMISSION_GCM_INTENTS
- permission.
- BroadcastReceiver(s) handles the 2 GCM intents
- (com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_MESSAGE
- and
- com.google.android.gcm.GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK).
- PACKAGE_NAME is the application package.
- - This method should be used during development time to verify that the - manifest is properly set up, but it doesn't need to be called once the - application is deployed to the users' devices.
| context - | application context. | -
|---|
| IllegalStateException - | if any of the conditions above is not met. - | -
|---|
Gets how long (in milliseconds) the isRegistered(Context)
- property is valid.
setRegisteredOnServer(Context, boolean) or
- DEFAULT_ON_SERVER_LIFESPAN_MS if not set.
-Gets the current registration id for application on GCM service. -
- If result is empty, the registration has failed.
Checks whether the application was successfully registered on GCM - service. -
Checks whether the device was successfully registered in the server side,
- as set by setRegisteredOnServer(Context, boolean).
-
-
To avoid the scenario where the device sends the registration to the
- server but the server loses it, this flag has an expiration date, which
- is DEFAULT_ON_SERVER_LIFESPAN_MS by default (but can be changed
- by setRegisterOnServerLifespan(Context, long)).
-
Clear internal resources. - -
- This method should be called by the main activity's onDestroy()
- method.
-
Initiate messaging registration for the current application. -
- The result will be returned as an
- INTENT_FROM_GCM_REGISTRATION_CALLBACK intent with
- either a EXTRA_REGISTRATION_ID or
- EXTRA_ERROR.
| context - | application context. | -
|---|---|
| senderIds - | Google Project ID of the accounts authorized to send - messages to this application. | -
| IllegalStateException - | if device does not have all GCM - dependencies installed. - | -
|---|
Sets how long (in milliseconds) the isRegistered(Context)
- flag is valid.
-
Sets whether the device was successfully registered in the server side. -
Unregister the application. -
- The result will be returned as an
- INTENT_FROM_GCM_REGISTRATION_CALLBACK intent with an
- EXTRA_UNREGISTERED extra.
-
- About Android | - Legal | - Support -
-DEPRECATED — please use the GoogleCloudMessaging API instead of this client helper library — see GCM Client for more information.
- - -| GCMBaseIntentService | -
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
- |
-
| GCMBroadcastReceiver | -
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
- |
-
| GCMConstants | -
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
- |
-
| GCMRegistrar | -
- This class is deprecated.
- Please use the
- GoogleCloudMessaging API instead.
- |
-
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Constants | -
Constants used on GCM service communication. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -ERROR_DEVICE_QUOTA_EXCEEDED | -Too many messages sent by the sender to a specific device. | -|||||||||
| String | -ERROR_INTERNAL_SERVER_ERROR | -A particular message could not be sent because the GCM servers encountered - an error. | -|||||||||
| String | -ERROR_INVALID_REGISTRATION | -Bad registration_id. | -|||||||||
| String | -ERROR_INVALID_TTL | -Time to Live value passed is less than zero or more than maximum. | -|||||||||
| String | -ERROR_MESSAGE_TOO_BIG | -The payload of the message is too big, see the limitations. | -|||||||||
| String | -ERROR_MISMATCH_SENDER_ID | -The sender_id contained in the registration_id does not match the - sender_id used to register with the GCM servers. | -|||||||||
| String | -ERROR_MISSING_COLLAPSE_KEY | -Collapse key is required. | -|||||||||
| String | -ERROR_MISSING_REGISTRATION | -Missing registration_id. | -|||||||||
| String | -ERROR_NOT_REGISTERED | -The user has uninstalled the application or turned off notifications. | -|||||||||
| String | -ERROR_QUOTA_EXCEEDED | -Too many messages sent by the sender. | -|||||||||
| String | -ERROR_UNAVAILABLE | -A particular message could not be sent because the GCM servers were not - available. | -|||||||||
| String | -GCM_SEND_ENDPOINT | -Endpoint for sending messages. | -|||||||||
| String | -JSON_CANONICAL_IDS | -JSON-only field representing the number of messages with a canonical - registration id. | -|||||||||
| String | -JSON_ERROR | -JSON-only field representing the error field of an individual request. | -|||||||||
| String | -JSON_FAILURE | -JSON-only field representing the number of failed messages. | -|||||||||
| String | -JSON_MESSAGE_ID | -JSON-only field sent by GCM when a message was successfully sent. | -|||||||||
| String | -JSON_MULTICAST_ID | -JSON-only field representing the id of the multicast request. | -|||||||||
| String | -JSON_PAYLOAD | -JSON-only field representing the payload data. | -|||||||||
| String | -JSON_REGISTRATION_IDS | -JSON-only field representing the registration ids. | -|||||||||
| String | -JSON_RESULTS | -JSON-only field representing the result of each individual request. | -|||||||||
| String | -JSON_SUCCESS | -JSON-only field representing the number of successful messages. | -|||||||||
| String | -PARAM_COLLAPSE_KEY | -HTTP parameter for collapse key. | -|||||||||
| String | -PARAM_DELAY_WHILE_IDLE | -HTTP parameter for delaying the message delivery if the device is idle. | -|||||||||
| String | -PARAM_DRY_RUN | -HTTP parameter for telling gcm to validate the message without actually sending it. | -|||||||||
| String | -PARAM_PAYLOAD_PREFIX | -Prefix to HTTP parameter used to pass key-values in the message payload. | -|||||||||
| String | -PARAM_REGISTRATION_ID | -HTTP parameter for registration id. | -|||||||||
| String | -PARAM_RESTRICTED_PACKAGE_NAME | -HTTP parameter for package name that can be used to restrict message delivery by matching - against the package name used to generate the registration id. | -|||||||||
| String | -PARAM_TIME_TO_LIVE | -Prefix to HTTP parameter used to set the message time-to-live. | -|||||||||
| String | -TOKEN_CANONICAL_REG_ID | -Token returned by GCM when the requested registration id has a canonical - value. | -|||||||||
| String | -TOKEN_ERROR | -Token returned by GCM when there was an error sending a message. | -|||||||||
| String | -TOKEN_MESSAGE_ID | -Token returned by GCM when a message was successfully sent. | -|||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Too many messages sent by the sender to a specific device. - Retry after a while. -
A particular message could not be sent because the GCM servers encountered - an error. Used only on JSON requests, as in plain text requests internal - errors are indicated by a 500 response. -
Bad registration_id. Sender should remove this registration_id. -
Time to Live value passed is less than zero or more than maximum. -
The payload of the message is too big, see the limitations. - Reduce the size of the message. -
The sender_id contained in the registration_id does not match the - sender_id used to register with the GCM servers. -
Collapse key is required. Include collapse key in the request. -
Missing registration_id. - Sender should always add the registration_id to the request. -
The user has uninstalled the application or turned off notifications. - Sender should stop sending messages to this device and delete the - registration_id. The client needs to re-register with the GCM servers to - receive notifications again. -
Too many messages sent by the sender. Retry after a while. -
A particular message could not be sent because the GCM servers were not - available. Used only on JSON requests, as in plain text requests - unavailability is indicated by a 503 response. -
Endpoint for sending messages. -
JSON-only field representing the number of messages with a canonical - registration id. -
JSON-only field representing the error field of an individual request. -
JSON-only field representing the number of failed messages. -
JSON-only field sent by GCM when a message was successfully sent. -
JSON-only field representing the id of the multicast request. -
JSON-only field representing the payload data. -
JSON-only field representing the registration ids. -
JSON-only field representing the result of each individual request. -
JSON-only field representing the number of successful messages. -
HTTP parameter for collapse key. -
HTTP parameter for delaying the message delivery if the device is idle. -
HTTP parameter for telling gcm to validate the message without actually sending it. -
Prefix to HTTP parameter used to pass key-values in the message payload. -
HTTP parameter for registration id. -
HTTP parameter for package name that can be used to restrict message delivery by matching - against the package name used to generate the registration id. -
Prefix to HTTP parameter used to set the message time-to-live. -
Token returned by GCM when the requested registration id has a canonical - value. -
Token returned by GCM when there was an error sending a message. -
Token returned by GCM when a message was successfully sent. -
- About Android | - Legal | - Support -
-| java.lang.Object | -||||
| ↳ | - -java.lang.Throwable | -|||
| - - | ↳ | - -java.lang.Exception | -||
| - - | - - | ↳ | - -java.io.IOException | -|
| - - | - - | - - | ↳ | - -com.google.android.gcm.server.InvalidRequestException | -
Exception thrown when GCM returned an error due to an invalid request. -
- This is equivalent to GCM posts that return an HTTP error different of 200. -
- - - - - -| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the error description.
-
- | |||||||||||
Gets the HTTP Status Code.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Throwable
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Gets the error description. -
Gets the HTTP Status Code. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Message.Builder | -
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a key/value pair to the payload data.
-
- | |||||||||||
Sets the collapseKey property.
-
- | |||||||||||
Sets the delayWhileIdle property (default value is false).
-
- | |||||||||||
Sets the dryRun property (default value is false).
-
- | |||||||||||
Sets the restrictedPackageName property.
-
- | |||||||||||
Sets the time to live, in seconds.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Adds a key/value pair to the payload data. -
Sets the collapseKey property. -
Sets the delayWhileIdle property (default value is false). -
Sets the dryRun property (default value is false). -
Sets the restrictedPackageName property. -
Sets the time to live, in seconds. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Message | -
GCM message. - -
- Instances of this class are immutable and should be created using a
- Message.Builder. Examples:
-
- Simplest message:
-
- Message message = new Message.Builder().build();
-
-
- Message with optional attributes:
-
- Message message = new Message.Builder()
- .collapseKey(collapseKey)
- .timeToLive(3)
- .delayWhileIdle(true)
- .dryRun(true)
- .restrictedPackageName(restrictedPackageName)
- .build();
-
-
- Message with optional attributes and payload data:
-
- Message message = new Message.Builder()
- .collapseKey(collapseKey)
- .timeToLive(3)
- .delayWhileIdle(true)
- .dryRun(true)
- .restrictedPackageName(restrictedPackageName)
- .addData("key1", "value1")
- .addData("key2", "value2")
- .build();
-
-
-
-
-
-
-
-| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Message.Builder | -- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the collapse key.
-
- | |||||||||||
Gets the payload data, which is immutable.
-
- | |||||||||||
Gets the restricted package name.
-
- | |||||||||||
Gets the time to live (in seconds).
-
- | |||||||||||
Gets the delayWhileIdle flag.
-
- | |||||||||||
Gets the dryRun flag.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Gets the collapse key. -
Gets the payload data, which is immutable. -
Gets the restricted package name. -
Gets the time to live (in seconds). -
Gets the delayWhileIdle flag. -
Gets the dryRun flag. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.MulticastResult.Builder | -
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.MulticastResult | -
Result of a GCM multicast message request . -
- - - - - -| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MulticastResult.Builder | -- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the number of successful messages that also returned a canonical
- registration id.
-
- | |||||||||||
Gets the number of failed messages.
-
- | |||||||||||
Gets the multicast id.
-
- | |||||||||||
Gets the results of each individual message, which is immutable.
-
- | |||||||||||
Gets additional ids if more than one multicast message was sent.
-
- | |||||||||||
Gets the number of successful messages.
-
- | |||||||||||
Gets the total number of messages sent, regardless of the status.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Gets the number of successful messages that also returned a canonical - registration id. -
Gets the number of failed messages. -
Gets the multicast id. -
Gets the results of each individual message, which is immutable. -
Gets additional ids if more than one multicast message was sent. -
Gets the number of successful messages. -
Gets the total number of messages sent, regardless of the status. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Result.Builder | -
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Result | -
Result of a GCM message request that returned HTTP status code 200. - -
- If the message is successfully created, the getMessageId() returns
- the message id and getErrorCodeName() returns null;
- otherwise, getMessageId() returns null and
- getErrorCodeName() returns the code of the error.
-
-
- There are cases when a request is accept and the message successfully - created, but GCM has a canonical registration id for that device. In this - case, the server should update the registration id to avoid rejected requests - in the future. - -
- In a nutshell, the workflow to handle a result is: -
- - Call- - - - - - -getMessageId(): - - null means error, callgetErrorCodeName()- - non-null means the message was created: - - CallgetCanonicalRegistrationId()- - if it returns null, do nothing. - - otherwise, update the server datastore with the new id. -
| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Result.Builder | -- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the canonical registration id, if any.
-
- | |||||||||||
Gets the error code, if any.
-
- | |||||||||||
Gets the message id, if any.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Gets the canonical registration id, if any. -
Gets the error code, if any. -
Gets the message id, if any. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gcm.server.Sender | -
Helper class to send messages to the GCM service using an API Key. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | -BACKOFF_INITIAL_DELAY | -Initial delay before first retry, without jitter. | -|||||||||
| int | -MAX_BACKOFF_DELAY | -Maximum delay before a retry. | -|||||||||
| String | -UTF8 | -- | |||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| logger | -- | ||||||||||
| random | -- | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor.
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Sends a message to many devices, retrying in case of unavailability.
-
- | |||||||||||
Sends a message to one device, retrying in case of unavailability.
-
- | |||||||||||
Sends a message without retrying in case of service unavailability.
-
- | |||||||||||
Sends a message without retrying in case of service unavailability.
-
- | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Adds a new parameter to the HTTP POST body.
-
- | |||||||||||
Gets an
-
- HttpURLConnection given an URL. | |||||||||||
Convenience method to convert an InputStream to a String.
-
- | |||||||||||
Creates a
-
- StringBuilder to be used as the body of an HTTP POST. | |||||||||||
Creates a map with just one key-value pair.
-
- | |||||||||||
Makes an HTTP POST request to a given endpoint.
-
- | |||||||||||
Make an HTTP post to a given URL.
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Initial delay before first retry, without jitter. -
Maximum delay before a retry. -
Default constructor.
| key - | API key obtained through the Google API Console. - | -
|---|
Sends a message to many devices, retrying in case of unavailability. - -
- Note: this method uses exponential back-off to retry in - case of service unavailability and hence could block the calling thread - for many seconds.
| message - | message to be sent. | -
|---|---|
| regIds - | registration id of the devices that will receive - the message. | -
| retries - | number of retries in case of service unavailability errors. | -
| IllegalArgumentException - | if registrationIds is null or - empty. | -
|---|---|
| InvalidRequestException - | if GCM didn't returned a 200 or 503 status. | -
| IOException - | if message could not be sent. - | -
Sends a message to one device, retrying in case of unavailability. - -
- Note: this method uses exponential back-off to retry in - case of service unavailability and hence could block the calling thread - for many seconds.
| message - | message to be sent, including the device's registration id. | -
|---|---|
| registrationId - | device where the message will be sent. | -
| retries - | number of retries in case of service unavailability errors. | -
| IllegalArgumentException - | if registrationId is null. | -
|---|---|
| InvalidRequestException - | if GCM didn't returned a 200 or 5xx status. | -
| IOException - | if message could not be sent. - | -
Sends a message without retrying in case of service unavailability. See
- send(Message, String, int) for more info.
| InvalidRequestException - | if GCM didn't returned a 200 or 5xx status. | -
|---|---|
| IllegalArgumentException - | if registrationId is null. - | -
| IOException - | - |
Sends a message without retrying in case of service unavailability. See
- send(Message, List, int) for more info.
| IllegalArgumentException - | if registrationIds is null or - empty. | -
|---|---|
| InvalidRequestException - | if GCM didn't returned a 200 status. | -
| IOException - | if there was a JSON parsing error - | -
Adds a new parameter to the HTTP POST body.
| body - | HTTP POST body. | -
|---|---|
| name - | parameter's name. | -
| value - | parameter's value. - | -
Gets an HttpURLConnection given an URL.
-
| IOException - | - |
|---|
Convenience method to convert an InputStream to a String. -
- If the stream ends in a newline character, it will be stripped. -
- If the stream is null, returns an empty string. -
| IOException - | - |
|---|
Creates a StringBuilder to be used as the body of an HTTP POST.
| name - | initial parameter for the POST. | -
|---|---|
| value - | initial value for that parameter. | -
Creates a map with just one key-value pair. -
Makes an HTTP POST request to a given endpoint. - -
- Note: the returned connected should not be disconnected, - otherwise it would kill persistent connections made using Keep-Alive.
| url - | endpoint to post the request. | -
|---|---|
| contentType - | type of request. | -
| body - | body of the request. | -
| IOException - | propagated from underlying methods. - | -
|---|
Make an HTTP post to a given URL.
| IOException - | - |
|---|
- About Android | - Legal | - Support -
-Helper library for GCM HTTP server operations — see GCM Server for more information.
- - -| Constants | -Constants used on GCM service communication. | -
| Message | -GCM message. | -
| Message.Builder | -- |
| MulticastResult | -Result of a GCM multicast message request . | -
| MulticastResult.Builder | -- |
| Result | -Result of a GCM message request that returned HTTP status code 200. | -
| Result.Builder | -- |
| Sender | -Helper class to send messages to the GCM service using an API Key. | -
| InvalidRequestException | -Exception thrown when GCM returned an error due to an invalid request. | -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.attr | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| adSize | -
- Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. - - - - |
- ||||||||||
| adSizes | -
- Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. - - - - |
- ||||||||||
| adUnitId | -
- Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. - - - - |
- ||||||||||
| appTheme | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| buyButtonAppearance | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| buyButtonHeight | -
- May be a dimension value, which is a floating point number appended with a unit such as " |
- ||||||||||
| buyButtonText | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| buyButtonWidth | -
- May be a dimension value, which is a floating point number appended with a unit such as " |
- ||||||||||
| cameraBearing | -
- Must be a floating point value, such as " |
- ||||||||||
| cameraTargetLat | -
- Must be a floating point value, such as " |
- ||||||||||
| cameraTargetLng | -
- Must be a floating point value, such as " |
- ||||||||||
| cameraTilt | -
- Must be a floating point value, such as " |
- ||||||||||
| cameraZoom | -
- Must be a floating point value, such as " |
- ||||||||||
| circleCrop | -
- Must be a boolean value, either " |
- ||||||||||
| environment | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| fragmentMode | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| fragmentStyle | -
- Must be a reference to another resource, in the form " |
- ||||||||||
| imageAspectRatio | -
- Must be a floating point value, such as " |
- ||||||||||
| imageAspectRatioAdjust | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| liteMode | -
- Must be a boolean value, either " |
- ||||||||||
| mapType | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| maskedWalletDetailsBackground | -
- May be a reference to another resource, in the form " |
- ||||||||||
| maskedWalletDetailsButtonBackground | -
- May be a reference to another resource, in the form " |
- ||||||||||
| maskedWalletDetailsButtonTextAppearance | -
- Must be a reference to another resource, in the form " |
- ||||||||||
| maskedWalletDetailsHeaderTextAppearance | -
- Must be a reference to another resource, in the form " |
- ||||||||||
| maskedWalletDetailsLogoImageType | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| maskedWalletDetailsLogoTextColor | -
- Must be a color value, in the form of " |
- ||||||||||
| maskedWalletDetailsTextAppearance | -
- Must be a reference to another resource, in the form " |
- ||||||||||
| uiCompass | -
- Must be a boolean value, either " |
- ||||||||||
| uiMapToolbar | -
- Must be a boolean value, either " |
- ||||||||||
| uiRotateGestures | -
- Must be a boolean value, either " |
- ||||||||||
| uiScrollGestures | -
- Must be a boolean value, either " |
- ||||||||||
| uiTiltGestures | -
- Must be a boolean value, either " |
- ||||||||||
| uiZoomControls | -
- Must be a boolean value, either " |
- ||||||||||
| uiZoomGestures | -
- Must be a boolean value, either " |
- ||||||||||
| useViewLifecycle | -
- Must be a boolean value, either " |
- ||||||||||
| windowTransitionStyle | -
- Must be one of the following constant values. - - - - |
- ||||||||||
| zOrderOnTop | -
- Must be a boolean value, either " |
- ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
holo_dark | 0 | |
holo_light | 1 |
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
classic | 1 | |
grayscale | 2 | |
monochrome | 3 |
May be a dimension value, which is a floating point number appended with a unit such as "14.5sp".
-Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
-in (inches), mm (millimeters).
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
May be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
match_parent | -1 | |
wrap_content | -2 |
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
buy_with_google | 1 | |
buy_now | 2 | |
book_now | 3 | |
donate_with_google | 4 |
May be a dimension value, which is a floating point number appended with a unit such as "14.5sp".
-Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
-in (inches), mm (millimeters).
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
May be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
match_parent | -1 | |
wrap_content | -2 |
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
production | 1 | |
sandbox | 0 | |
strict_sandbox | 2 |
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
buyButton | 1 | |
selectionDetails | 2 |
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
none | 0 | |
adjust_width | 1 | |
adjust_height | 2 |
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
none | 0 | |
normal | 1 | |
satellite | 2 | |
terrain | 3 | |
hybrid | 4 |
May be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
May be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
-
May be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
May be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
classic | 1 | |
monochrome | 2 |
Must be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
slide | 1 | |
none | 2 |
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.color | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| common_action_bar_splitter | -- - - - - | -||||||||||
| common_signin_btn_dark_text_default | -- - - - - | -||||||||||
| common_signin_btn_dark_text_disabled | -- - - - - | -||||||||||
| common_signin_btn_dark_text_focused | -- - - - - | -||||||||||
| common_signin_btn_dark_text_pressed | -- - - - - | -||||||||||
| common_signin_btn_default_background | -- - - - - | -||||||||||
| common_signin_btn_light_text_default | -- - - - - | -||||||||||
| common_signin_btn_light_text_disabled | -- - - - - | -||||||||||
| common_signin_btn_light_text_focused | -- - - - - | -||||||||||
| common_signin_btn_light_text_pressed | -- - - - - | -||||||||||
| common_signin_btn_text_dark | -- - - - - | -||||||||||
| common_signin_btn_text_light | -- - - - - | -||||||||||
| wallet_bright_foreground_disabled_holo_light | -- - - - - | -||||||||||
| wallet_bright_foreground_holo_dark | -- - - - - | -||||||||||
| wallet_bright_foreground_holo_light | -- - - - - | -||||||||||
| wallet_dim_foreground_disabled_holo_dark | -- - - - - | -||||||||||
| wallet_dim_foreground_holo_dark | -- - - - - | -||||||||||
| wallet_dim_foreground_inverse_disabled_holo_dark | -- - - - - | -||||||||||
| wallet_dim_foreground_inverse_holo_dark | -- - - - - | -||||||||||
| wallet_highlighted_text_holo_dark | -- - - - - | -||||||||||
| wallet_highlighted_text_holo_light | -- - - - - | -||||||||||
| wallet_hint_foreground_holo_dark | -- - - - - | -||||||||||
| wallet_hint_foreground_holo_light | -- - - - - | -||||||||||
| wallet_holo_blue_light | -- - - - - | -||||||||||
| wallet_link_text_light | -- - - - - | -||||||||||
| wallet_primary_text_holo_light | -- - - - - | -||||||||||
| wallet_secondary_text_holo_dark | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.drawable | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| common_full_open_on_phone | -- - - - - | -||||||||||
| common_ic_googleplayservices | -- - - - - | -||||||||||
| common_signin_btn_icon_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_disabled_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_disabled_focus_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_disabled_focus_light | -- - - - - | -||||||||||
| common_signin_btn_icon_disabled_light | -- - - - - | -||||||||||
| common_signin_btn_icon_focus_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_focus_light | -- - - - - | -||||||||||
| common_signin_btn_icon_light | -- - - - - | -||||||||||
| common_signin_btn_icon_normal_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_normal_light | -- - - - - | -||||||||||
| common_signin_btn_icon_pressed_dark | -- - - - - | -||||||||||
| common_signin_btn_icon_pressed_light | -- - - - - | -||||||||||
| common_signin_btn_text_dark | -- - - - - | -||||||||||
| common_signin_btn_text_disabled_dark | -- - - - - | -||||||||||
| common_signin_btn_text_disabled_focus_dark | -- - - - - | -||||||||||
| common_signin_btn_text_disabled_focus_light | -- - - - - | -||||||||||
| common_signin_btn_text_disabled_light | -- - - - - | -||||||||||
| common_signin_btn_text_focus_dark | -- - - - - | -||||||||||
| common_signin_btn_text_focus_light | -- - - - - | -||||||||||
| common_signin_btn_text_light | -- - - - - | -||||||||||
| common_signin_btn_text_normal_dark | -- - - - - | -||||||||||
| common_signin_btn_text_normal_light | -- - - - - | -||||||||||
| common_signin_btn_text_pressed_dark | -- - - - - | -||||||||||
| common_signin_btn_text_pressed_light | -- - - - - | -||||||||||
| ic_plusone_medium_off_client | -- - - - - | -||||||||||
| ic_plusone_small_off_client | -- - - - - | -||||||||||
| ic_plusone_standard_off_client | -- - - - - | -||||||||||
| ic_plusone_tall_off_client | -- - - - - | -||||||||||
| powered_by_google_dark | -- - - - - | -||||||||||
| powered_by_google_light | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R | -
| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| R.attr | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.color | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.drawable | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.id | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.integer | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.raw | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.string | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.style | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| R.styleable | -- - - - - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.id | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| adjust_height | -- - - - - | -||||||||||
| adjust_width | -- - - - - | -||||||||||
| book_now | -- - - - - | -||||||||||
| buyButton | -- - - - - | -||||||||||
| buy_now | -- - - - - | -||||||||||
| buy_with_google | -- - - - - | -||||||||||
| classic | -- - - - - | -||||||||||
| donate_with_google | -- - - - - | -||||||||||
| grayscale | -- - - - - | -||||||||||
| holo_dark | -- - - - - | -||||||||||
| holo_light | -- - - - - | -||||||||||
| hybrid | -- - - - - | -||||||||||
| match_parent | -- - - - - | -||||||||||
| monochrome | -- - - - - | -||||||||||
| none | -- - - - - | -||||||||||
| normal | -- - - - - | -||||||||||
| production | -- - - - - | -||||||||||
| sandbox | -- - - - - | -||||||||||
| satellite | -- - - - - | -||||||||||
| selectionDetails | -- - - - - | -||||||||||
| slide | -- - - - - | -||||||||||
| strict_sandbox | -- - - - - | -||||||||||
| terrain | -- - - - - | -||||||||||
| wrap_content | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.integer | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| google_play_services_version | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.raw | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| gtm_analytics | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.string | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| accept | -- - - - - | -||||||||||
| common_android_wear_notification_needs_update_text | -- - - - - | -||||||||||
| common_android_wear_update_text | -- - - - - | -||||||||||
| common_android_wear_update_title | -- - - - - | -||||||||||
| common_google_play_services_enable_button | -- - - - - | -||||||||||
| common_google_play_services_enable_text | -- - - - - | -||||||||||
| common_google_play_services_enable_title | -- - - - - | -||||||||||
| common_google_play_services_error_notification_requested_by_msg | -- - - - - | -||||||||||
| common_google_play_services_install_button | -- - - - - | -||||||||||
| common_google_play_services_install_text_phone | -- - - - - | -||||||||||
| common_google_play_services_install_text_tablet | -- - - - - | -||||||||||
| common_google_play_services_install_title | -- - - - - | -||||||||||
| common_google_play_services_invalid_account_text | -- - - - - | -||||||||||
| common_google_play_services_invalid_account_title | -- - - - - | -||||||||||
| common_google_play_services_needs_enabling_title | -- - - - - | -||||||||||
| common_google_play_services_network_error_text | -- - - - - | -||||||||||
| common_google_play_services_network_error_title | -- - - - - | -||||||||||
| common_google_play_services_notification_needs_installation_title | -- - - - - | -||||||||||
| common_google_play_services_notification_needs_update_title | -- - - - - | -||||||||||
| common_google_play_services_notification_ticker | -- - - - - | -||||||||||
| common_google_play_services_sign_in_failed_text | -- - - - - | -||||||||||
| common_google_play_services_sign_in_failed_title | -- - - - - | -||||||||||
| common_google_play_services_unknown_issue | -- - - - - | -||||||||||
| common_google_play_services_unsupported_text | -- - - - - | -||||||||||
| common_google_play_services_unsupported_title | -- - - - - | -||||||||||
| common_google_play_services_update_button | -- - - - - | -||||||||||
| common_google_play_services_update_text | -- - - - - | -||||||||||
| common_google_play_services_update_title | -- - - - - | -||||||||||
| common_open_on_phone | -- - - - - | -||||||||||
| common_signin_button_text | -- - - - - | -||||||||||
| common_signin_button_text_long | -- - - - - | -||||||||||
| commono_google_play_services_api_unavailable_text | -- - - - - | -||||||||||
| create_calendar_message | -- - - - - | -||||||||||
| create_calendar_title | -- - - - - | -||||||||||
| decline | -- - - - - | -||||||||||
| store_picture_message | -- - - - - | -||||||||||
| store_picture_title | -- - - - - | -||||||||||
| wallet_buy_button_place_holder | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.style | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Theme_IAPTheme | -- - - - - | -||||||||||
| WalletFragmentDefaultButtonTextAppearance | -- - - - - | -||||||||||
| WalletFragmentDefaultDetailsHeaderTextAppearance | -- - - - - | -||||||||||
| WalletFragmentDefaultDetailsTextAppearance | -- - - - - | -||||||||||
| WalletFragmentDefaultStyle | -- - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.R.styleable | -
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AdsAttrs | -- Attributes that can be used with a AdsAttrs. - - - - | -||||||||||
| AdsAttrs_adSize | -
- This symbol is the offset where the |
- ||||||||||
| AdsAttrs_adSizes | -
- This symbol is the offset where the |
- ||||||||||
| AdsAttrs_adUnitId | -
- This symbol is the offset where the |
- ||||||||||
| CustomWalletTheme | -- Attributes that can be used with a CustomWalletTheme. - - - - | -||||||||||
| CustomWalletTheme_windowTransitionStyle | -
- This symbol is the offset where the |
- ||||||||||
| LoadingImageView | -- Attributes that can be used with a LoadingImageView. - - - - | -||||||||||
| LoadingImageView_circleCrop | -
- This symbol is the offset where the |
- ||||||||||
| LoadingImageView_imageAspectRatio | -
- This symbol is the offset where the |
- ||||||||||
| LoadingImageView_imageAspectRatioAdjust | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs | -- Attributes that can be used with a MapAttrs. - - - - | -||||||||||
| MapAttrs_cameraBearing | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_cameraTargetLat | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_cameraTargetLng | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_cameraTilt | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_cameraZoom | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_liteMode | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_mapType | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiCompass | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiMapToolbar | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiRotateGestures | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiScrollGestures | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiTiltGestures | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiZoomControls | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_uiZoomGestures | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_useViewLifecycle | -
- This symbol is the offset where the |
- ||||||||||
| MapAttrs_zOrderOnTop | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentOptions | -- Attributes that can be used with a WalletFragmentOptions. - - - - | -||||||||||
| WalletFragmentOptions_appTheme | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentOptions_environment | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentOptions_fragmentMode | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentOptions_fragmentStyle | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle | -- Attributes that can be used with a WalletFragmentStyle. - - - - | -||||||||||
| WalletFragmentStyle_buyButtonAppearance | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_buyButtonHeight | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_buyButtonText | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_buyButtonWidth | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsBackground | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsButtonBackground | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsButtonTextAppearance | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsHeaderTextAppearance | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsLogoImageType | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsLogoTextColor | -
- This symbol is the offset where the |
- ||||||||||
| WalletFragmentStyle_maskedWalletDetailsTextAppearance | -
- This symbol is the offset where the |
- ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Attributes that can be used with a AdsAttrs. -
Includes the following attributes:
-| Attribute | Description |
|---|---|
| |
| |
|
This symbol is the offset where the adSize
- attribute's value can be found in the AdsAttrs array.
-
-
-
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the adSizes
- attribute's value can be found in the AdsAttrs array.
-
-
-
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the adUnitId
- attribute's value can be found in the AdsAttrs array.
-
-
-
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character. -
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
Attributes that can be used with a CustomWalletTheme. -
Includes the following attributes:
-| Attribute | Description |
|---|---|
|
This symbol is the offset where the windowTransitionStyle
- attribute's value can be found in the CustomWalletTheme array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
slide | 1 | |
none | 2 |
Attributes that can be used with a LoadingImageView. -
Includes the following attributes:
-| Attribute | Description |
|---|---|
| |
| |
|
This symbol is the offset where the circleCrop
- attribute's value can be found in the LoadingImageView array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the imageAspectRatio
- attribute's value can be found in the LoadingImageView array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the imageAspectRatioAdjust
- attribute's value can be found in the LoadingImageView array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
none | 0 | |
adjust_width | 1 | |
adjust_height | 2 |
Attributes that can be used with a MapAttrs. -
Includes the following attributes:
-MapAttrs_cameraBearingMapAttrs_cameraTargetLatMapAttrs_cameraTargetLngMapAttrs_cameraTiltMapAttrs_cameraZoomMapAttrs_liteModeMapAttrs_mapTypeMapAttrs_uiCompassMapAttrs_uiMapToolbarMapAttrs_uiRotateGesturesMapAttrs_uiScrollGesturesMapAttrs_uiTiltGesturesMapAttrs_uiZoomControlsMapAttrs_uiZoomGesturesMapAttrs_useViewLifecycleMapAttrs_zOrderOnTopThis symbol is the offset where the cameraBearing
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the cameraTargetLat
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the cameraTargetLng
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the cameraTilt
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the cameraZoom
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a floating point value, such as "1.2".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the liteMode
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiCompass
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiMapToolbar
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiRotateGestures
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiScrollGestures
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiTiltGestures
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiZoomControls
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the uiZoomGestures
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the useViewLifecycle
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the zOrderOnTop
- attribute's value can be found in the MapAttrs array.
-
-
-
Must be a boolean value, either "true" or "false".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
Attributes that can be used with a WalletFragmentOptions. -
Includes the following attributes:
-| Attribute | Description |
|---|---|
| |
| |
| |
|
This symbol is the offset where the appTheme
- attribute's value can be found in the WalletFragmentOptions array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
holo_dark | 0 | |
holo_light | 1 |
This symbol is the offset where the environment
- attribute's value can be found in the WalletFragmentOptions array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
production | 1 | |
sandbox | 0 | |
strict_sandbox | 2 |
This symbol is the offset where the fragmentMode
- attribute's value can be found in the WalletFragmentOptions array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
buyButton | 1 | |
selectionDetails | 2 |
This symbol is the offset where the fragmentStyle
- attribute's value can be found in the WalletFragmentOptions array.
-
-
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
Attributes that can be used with a WalletFragmentStyle. -
Includes the following attributes:
-WalletFragmentStyle_buyButtonAppearanceWalletFragmentStyle_buyButtonHeightWalletFragmentStyle_buyButtonTextWalletFragmentStyle_buyButtonWidthWalletFragmentStyle_maskedWalletDetailsBackgroundWalletFragmentStyle_maskedWalletDetailsButtonBackgroundWalletFragmentStyle_maskedWalletDetailsButtonTextAppearanceWalletFragmentStyle_maskedWalletDetailsHeaderTextAppearanceWalletFragmentStyle_maskedWalletDetailsLogoImageTypeWalletFragmentStyle_maskedWalletDetailsLogoTextColorWalletFragmentStyle_maskedWalletDetailsTextAppearanceThis symbol is the offset where the buyButtonAppearance
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
classic | 1 | |
grayscale | 2 | |
monochrome | 3 |
This symbol is the offset where the buyButtonHeight
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
May be a dimension value, which is a floating point number appended with a unit such as "14.5sp".
-Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
-in (inches), mm (millimeters).
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
May be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
match_parent | -1 | |
wrap_content | -2 |
This symbol is the offset where the buyButtonText
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
buy_with_google | 1 | |
buy_now | 2 | |
book_now | 3 | |
donate_with_google | 4 |
This symbol is the offset where the buyButtonWidth
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
May be a dimension value, which is a floating point number appended with a unit such as "14.5sp".
-Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size),
-in (inches), mm (millimeters).
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
-
May be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
match_parent | -1 | |
wrap_content | -2 |
This symbol is the offset where the maskedWalletDetailsBackground
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
May be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
May be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
This symbol is the offset where the maskedWalletDetailsButtonBackground
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
May be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
-
May be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
This symbol is the offset where the maskedWalletDetailsButtonTextAppearance
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
This symbol is the offset where the maskedWalletDetailsHeaderTextAppearance
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
This symbol is the offset where the maskedWalletDetailsLogoImageType
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be one of the following constant values.
-| Constant | Value | Description |
|---|---|---|
classic | 1 | |
monochrome | 2 |
This symbol is the offset where the maskedWalletDetailsLogoTextColor
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be a color value, in the form of "#rgb", "#argb",
-"#rrggbb", or "#aarrggbb".
-
This may also be a reference to a resource (in the form
-"@[package:]type:name") or
-theme attribute (in the form
-"?[package:][type:]name")
-containing a value of this type.
This symbol is the offset where the maskedWalletDetailsTextAppearance
- attribute's value can be found in the WalletFragmentStyle array.
-
-
-
Must be a reference to another resource, in the form "@[+][package:]type:name"
-or to a theme attribute in the form "?[package:][type:]name".
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.actions.ItemListIntents | -
Constants for intents to create and modify item lists from a Search Action. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -ACTION_ACCEPT_ITEM | -- Intent action for marking an existing list item complete. - - - - | -|||||||||
| String | -ACTION_APPEND_ITEM_LIST | -- Intent action for appending to an existing item list. - - - - | -|||||||||
| String | -ACTION_CREATE_ITEM_LIST | -- Intent action for creating an item list. - - - - | -|||||||||
| String | -ACTION_DELETE_ITEM | -- Intent action for deleting an existing list item. - - - - | -|||||||||
| String | -ACTION_DELETE_ITEM_LIST | -- Intent action for removing an item list. - - - - | -|||||||||
| String | -ACTION_REJECT_ITEM | -- Intent action for marking an existing list item incomplete. - - - - | -|||||||||
| String | -EXTRA_ITEM_NAME | -- Intent extra specifying the contents of a list item as a string. - - - - | -|||||||||
| String | -EXTRA_ITEM_NAMES | -
- Intent extra for specifying multiple items when creating a list with ACTION_CREATE_ITEM_LIST as a string array.
-
-
-
- |
- |||||||||
| String | -EXTRA_ITEM_QUERY | -- Intent extra specifying an unstructured query to identify a specific item as a string. - - - - | -|||||||||
| String | -EXTRA_LIST_NAME | -- Intent extra specifying an optional name or title as a string describing what the list - contains (e.g. - - - - | -|||||||||
| String | -EXTRA_LIST_QUERY | -- Intent extra specifying an unstructured query for an item list as a string. - - - - | -|||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Intent action for marking an existing list item complete. The intent can use extras to
- specify the item EXTRA_ITEM_QUERY (e.g. "buy eggs") and the list with
- EXTRA_LIST_QUERY (e.g. "todo"). Alternatively the item can be specified using
- setData(Uri) - the intent data will always be preferred over
- using EXTRA_ITEM_QUERY. If the item is ambiguous, the activity
- MUST ask the user to disambiguate.
-
- The activity MUST verify the operation with the user before committing the change. -
Intent action for appending to an existing item list. The intent should include an extra to
- specify the list to append with EXTRA_LIST_QUERY or specify the list
- with setData(Uri). If both are specified, the intent data will
- be preferred. If the name is ambiguous, the activity MUST ask the user to disambiguate.
-
- The intent can optionally include an extra specifying the item EXTRA_ITEM_NAME to
- add to the list. If the item is not specified, the activity should present a UI for the item
- to add.
-
- The activity MUST verify the operation with the user before committing the change. -
Intent action for creating an item list. The intent can include optional extras to
- specify the list name EXTRA_LIST_NAME and the initial list of items
- EXTRA_ITEM_NAMES. For example, a shopping list might have a list name of "shopping
- list" and item names of "ham" and "eggs".
-
- The activity MUST verify the operation with the user before committing the change. -
Intent action for deleting an existing list item. The intent can use extras to
- specify the item EXTRA_ITEM_QUERY (e.g. "buy eggs") and the list with
- EXTRA_LIST_QUERY (e.g. "todo"). Alternatively the item can be specified using
- setData(Uri) - the intent data will always be preferred over
- using EXTRA_ITEM_QUERY. If the item is ambiguous, the activity
- MUST ask the user to disambiguate.
-
- The activity MUST verify the operation with the user before committing the change. -
Intent action for removing an item list. The intent can include an optional extra to
- specify a list query EXTRA_LIST_QUERY that is used to identify the note to be
- removed. For example if the query is "shopping list" and there are two potentially matching
- lists "food shopping list" and "clothes shopping list" then both should be presented.
-
- The list to be deleted can also be specified with setData(Uri)
- - the intent data will be preferred if EXTRA_LIST_QUERY is also specified.
-
- The activity MUST verify the operation with the user before committing the change. -
Intent action for marking an existing list item incomplete. The intent can use extras to
- specify the item EXTRA_ITEM_QUERY (e.g. "buy eggs") and the list with
- EXTRA_LIST_QUERY (e.g. "todo"). Alternatively the item can be specified using
- setData(Uri) - the intent data will always be preferred over
- using EXTRA_ITEM_QUERY. If the item is ambiguous, the activity
- MUST ask the user to disambiguate.
-
- The activity MUST verify the operation with the user before committing the change. -
Intent extra specifying the contents of a list item as a string. For example in - a shopping list, the item names might be "eggs" and "ham". -
Intent extra for specifying multiple items when creating a list with ACTION_CREATE_ITEM_LIST as a string array. The individual values should
- be specied according to EXTRA_ITEM_NAME.
-
Intent extra specifying an unstructured query to identify a specific item as a string. The
- query should be matched against the name provided in EXTRA_ITEM_NAME.
-
Intent extra specifying an optional name or title as a string describing what the list - contains (e.g. "shopping" or "todo"). -
Intent extra specifying an unstructured query for an item list as a string. This could - search the list title or the items in the list to find a match, although matching the title - should be preferred. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.actions.NoteIntents | -
Constants for intents to create and modify notes from a Search Action. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -ACTION_APPEND_NOTE | -- Intent action for appending to an existing note. - - - - | -|||||||||
| String | -ACTION_CREATE_NOTE | -- Intent action for creating a note. - - - - | -|||||||||
| String | -ACTION_DELETE_NOTE | -- Intent action for removing an existing note. - - - - | -|||||||||
| String | -EXTRA_NAME | -- Intent extra specifying an optional title or subject for the note as a string. - - - - | -|||||||||
| String | -EXTRA_NOTE_QUERY | -- Intent extra specifying an unstructured query for a note as a string. - - - - | -|||||||||
| String | -EXTRA_TEXT | -- Intent extra specifying the text of the note as a string. - - - - | -|||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Intent action for appending to an existing note. The intent should include an extra to
- specify the text EXTRA_TEXT to append.
-
- The intent should specify the note to append to with the EXTRA_NOTE_QUERY extra.
- Alternatively the note can be specified using setData(Uri) -
- the intent data URI will always be preferred over EXTRA_NOTE_QUERY. If the note
- is ambiguous, the activity MUST ask the user to disambiguate.
-
- The activity MUST verify the result with the user before committing the change. -
Intent action for creating a note. The intent may optionally include an extra to
- specify the title or subject of the note EXTRA_NAME.
-
- For a text note the data mimetype will be "text/plain" and the content will be
- included in the EXTRA_TEXT.
-
- For an audio note, the audio data will be attached as
- ClipData with the data mimetype of "audio/<type>".
-
- Activities should restrict the types of content they can handle in the - intent filter. -
- The activity MUST verify the result with the user before committing the change. -
Intent action for removing an existing note. -
- The intent should specify the note to append to with the EXTRA_NOTE_QUERY extra.
- Alternatively the note can be specified using setData(Uri) -
- the intent data URI will always be preferred over EXTRA_NOTE_QUERY. If the note
- is ambiguous, the activity MUST ask the user to disambiguate.
-
- The activity MUST verify the result with the user before committing the change. -
Intent extra specifying an optional title or subject for the note as a string. The name
- can be used to locate the note later with EXTRA_NOTE_QUERY.
-
Intent extra specifying an unstructured query for a note as a string. This could - search the note name or the text content of the note. -
Intent extra specifying the text of the note as a string. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.actions.ReserveIntents | -
Constants for intents corresponding to Reserve Action. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -ACTION_RESERVE_TAXI_RESERVATION | -- Intent action for reserving a taxi. - - - - | -|||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Intent action for reserving a taxi. The application MUST confirm whatever action - will be taken with the user before completing the action (e.g. confirmation dialog). -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.actions.SearchIntents | -
Constants for intents to perform in-app search from a Search Action. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| String | -ACTION_SEARCH | -- Intent action for performing an in-app search. - - - - | -|||||||||
| String | -EXTRA_QUERY | -
- Intent extra specifying the text query to use as a string for ACTION_SEARCH.
-
-
-
- |
- |||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Intent action for performing an in-app search. The intent should include an optional
- extra to specify the text to search for EXTRA_QUERY. If no extras are
- provided, the application should just show an Activity with the search UI activated.
-
Intent extra specifying the text query to use as a string for ACTION_SEARCH.
-
- About Android | - Legal | - Support -
-| ItemListIntents | -- Constants for intents to create and modify item lists from a Search Action. - - - - | -
| NoteIntents | -- Constants for intents to create and modify notes from a Search Action. - - - - | -
| ReserveIntents | -- Constants for intents corresponding to Reserve Action. - - - - | -
| SearchIntents | -- Constants for intents to perform in-app search from a Search Action. - - - - | -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.AdListener | -
A listener for receiving notifications during the lifecycle of an ad. -
- - - - - -| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Called when the user is about to return to the application after clicking on an ad.
-
-
-
-
-
- | |||||||||||
- Called when an ad request failed.
-
-
-
-
-
- | |||||||||||
- Called when an ad leaves the application (e.g., to go to the browser).
-
-
-
-
-
- | |||||||||||
- Called when an ad is received.
-
-
-
-
-
- | |||||||||||
- Called when an ad opens an overlay that covers the screen.
-
-
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Called when the user is about to return to the application after clicking on an ad. -
Called when an ad request failed. The error code is usually
- ERROR_CODE_INTERNAL_ERROR, ERROR_CODE_INVALID_REQUEST,
- ERROR_CODE_NETWORK_ERROR, or ERROR_CODE_NO_FILL.
-
Called when an ad leaves the application (e.g., to go to the browser). -
Called when an ad is received. -
Called when an ad opens an overlay that covers the screen. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.AdRequest.Builder | -
Builds an AdRequest.
-
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Add extra parameters to pass to a specific custom event adapter.
-
-
-
-
-
- | |||||||||||
- Add a keyword for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Add extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Add extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Causes a device to receive test ads.
-
-
-
-
-
- | |||||||||||
- Constructs an
-
- AdRequest with the specified attributes.
-
-
-
- | |||||||||||
- Sets the user's birthday for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the content URL for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the user's gender for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the user's location for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the request agent string to identify the ad request's origin.
-
-
-
-
-
- | |||||||||||
- This method allows you to specify whether you would like your app to be treated as
- child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) -
-
- http://business.ftc.gov/privacy-and-security/childrens-privacy.
-
-
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Add a keyword for targeting purposes. -
Add extra parameters to pass to a specific ad network adapter. networkExtras
- should be an instance of com.google.ads.mediation.NetworkExtras, which is
- provided by ad network adapters.
-
Causes a device to receive test ads. The deviceId can be obtained by viewing the
- logcat output after creating a new ad.
-
Constructs an AdRequest with the specified attributes.
-
Sets the user's birthday for targeting purposes. -
Sets the content URL for targeting purposes.
| NullPointerException - | If contentUrl is {code null}. | -
|---|---|
| IllegalArgumentException - | If contentUrl is empty, or if its - length exceeds 512. - | -
Sets the user's gender for targeting purposes. This should be
- GENDER_MALE, GENDER_FEMALE, or GENDER_UNKNOWN.
-
Sets the user's location for targeting purposes. -
Sets the request agent string to identify the ad request's origin. Third party libraries - that reference the Mobile Ads SDK should call this method to denote the platform from - which the ad request originated. For example, if a third party ad network called - "CoolAds network" mediates requests to the Mobile Ads SDK, it should call this method - with "CoolAds". -
This method allows you to specify whether you would like your app to be treated as - child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - - - http://business.ftc.gov/privacy-and-security/childrens-privacy. -
- If you set this method to true, you will indicate that your app should be treated
- as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
-
- If you set this method to false, you will indicate that your app should not be
- treated as child-directed for purposes of the Children’s Online Privacy Protection Act
- (COPPA).
-
- If you do not set this method, ad requests will include no indication of how you would - like your app treated with respect to COPPA. -
- By setting this method, you certify that this notification is accurate and you are - authorized to act on behalf of the owner of the app. You understand that abuse of this - setting may result in termination of your Google account. -
- Note: it may take some time for this designation to be fully implemented in applicable - Google services. -
- This designation will only apply to ad requests for which you have set this method.
| tagForChildDirectedTreatment - | Set to true to indicate that your app should
- be treated as child-directed. Set to false to indicate that your app
- should not be treated as child-directed.
- |
-
|---|
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.AdRequest | -
An AdRequest contains targeting information used to fetch an ad. Ad requests are created
- using AdRequest.Builder.
-
- Publishers using DoubleClick for Publishers or Search Ads for Apps should use
- PublisherAdRequest or
- SearchAdRequest, respectively.
-
| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AdRequest.Builder | -
- Builds an AdRequest.
-
-
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | -ERROR_CODE_INTERNAL_ERROR | -- Something happened internally; for instance, an invalid response was received from the ad - server. - - - - | -|||||||||
| int | -ERROR_CODE_INVALID_REQUEST | -- The ad request was invalid; for instance, the ad unit ID was incorrect. - - - - | -|||||||||
| int | -ERROR_CODE_NETWORK_ERROR | -- The ad request was unsuccessful due to network connectivity. - - - - | -|||||||||
| int | -ERROR_CODE_NO_FILL | -- The ad request was successful, but no ad was returned due to lack of ad inventory. - - - - | -|||||||||
| int | -GENDER_FEMALE | -- Female gender. - - - - | -|||||||||
| int | -GENDER_MALE | -- Male gender. - - - - | -|||||||||
| int | -GENDER_UNKNOWN | -- Unknown gender. - - - - | -|||||||||
| int | -MAX_CONTENT_URL_LENGTH | -- The maximum content URL length. - - - - | -|||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEVICE_ID_EMULATOR | -
- The deviceId for emulators to be used with
- addTestDevice(String).
-
-
-
- |
- ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Returns the user's birthday targeting information.
-
-
-
-
-
- | |||||||||||
- Returns the content URL targeting information.
-
-
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific custom event adapter.
-
-
-
-
-
- | |||||||||||
- Returns the user's gender targeting information.
-
-
-
-
-
- | |||||||||||
- Returns targeting information keywords.
-
-
-
-
-
- | |||||||||||
- Returns the user's location targeting information.
-
-
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Returns
-
- true if this device will receive test ads.
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Something happened internally; for instance, an invalid response was received from the ad - server. -
The ad request was invalid; for instance, the ad unit ID was incorrect. -
The ad request was unsuccessful due to network connectivity. -
The ad request was successful, but no ad was returned due to lack of ad inventory. -
Female gender.
Male gender.
Unknown gender.
The maximum content URL length.
The deviceId for emulators to be used with
- addTestDevice(String).
-
Returns the user's birthday targeting information. Returns null if the birthday was
- not set.
-
Returns the content URL targeting information. Returns null if the contentUrl was
- not set.
-
Returns extra parameters to pass to a specific custom event adapter. Returns null if
- no custom event extras of the provided type were set.
-
Returns the user's gender targeting information. Returns -1 if the gender was not
- set.
-
Returns targeting information keywords. Returns an empty Set if no
- keywords were added.
-
Returns the user's location targeting information. Returns null if the location was
- not set.
-
Returns extra parameters to pass to a specific ad network adapter. Ad network adapters
- provide a NetworkExtras class. Returns null if no network extras of the
- provided type were set.
-
Returns extra parameters to pass to a specific ad network adapter. Returns null if no
- network extras of the provided type were set.
-
Returns true if this device will receive test ads.
-
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.AdSize | -
The size of a banner ad. -
- - - - - -| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | -AUTO_HEIGHT | -- Constant that will cause the height of the ad to scale based on the height of the device in - the current orientation. - - - - | -|||||||||
| int | -FULL_WIDTH | -- Constant that will cause the width of the ad to match the width of the device in the current - orientation. - - - - | -|||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| BANNER | -- Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels). - - - - | -||||||||||
| FULL_BANNER | -- Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). - - - - | -||||||||||
| LARGE_BANNER | -- Large banner ad size (320x100 density-independent pixels). - - - - | -||||||||||
| LEADERBOARD | -- Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). - - - - | -||||||||||
| MEDIUM_RECTANGLE | -- Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent - pixels). - - - - | -||||||||||
| SMART_BANNER | -- A dynamically sized banner that is full-width and auto-height. - - - - | -||||||||||
| WIDE_SKYSCRAPER | -- IAB wide skyscraper ad size (160x600 density-independent pixels). - - - - | -||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Create a new
-
- AdSize.
-
-
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Compares this
-
- AdSize with the specified object and indicates if they are equal.
-
-
-
- | |||||||||||
- Returns the height of this
-
- AdSize in density-independent pixels.
-
-
-
- | |||||||||||
- Returns the height of this
-
- AdSize in physical pixels.
-
-
-
- | |||||||||||
- Returns the width of this
-
- AdSize in density-independent pixels.
-
-
-
- | |||||||||||
- Returns the width of this
-
- AdSize in physical pixels.
-
-
-
- | |||||||||||
- Returns whether this
-
- AdSize is auto-height.
-
-
-
- | |||||||||||
- Returns whether this
-
- AdSize is full-width.
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Constant that will cause the height of the ad to scale based on the height of the device in
- the current orientation. An AUTO_HEIGHT ad determines its height during
- initialization of the AdView and never changes after that.
-
Constant that will cause the width of the ad to match the width of the device in the current
- orientation. A FULL_WIDTH ad determines its width during initialization of the
- AdView and never changes after that.
-
Mobile Marketing Association (MMA) banner ad size (320x50 density-independent pixels).
Interactive Advertising Bureau (IAB) full banner ad size (468x60 density-independent pixels). -
Large banner ad size (320x100 density-independent pixels). -
Interactive Advertising Bureau (IAB) leaderboard ad size (728x90 density-independent pixels). -
Interactive Advertising Bureau (IAB) medium rectangle ad size (300x250 density-independent - pixels). -
A dynamically sized banner that is full-width and auto-height.
IAB wide skyscraper ad size (160x600 density-independent pixels). This size is currently not - supported by the Google Mobile Ads network; this is intended for mediation ad networks only. -
Create a new AdSize.
| width - | The width of the ad in density-independent pixels. | -
|---|---|
| height - | The height of the ad in density-independent pixels. | -
| IllegalArgumentException - | If the width or height is negative. - | -
|---|
Compares this AdSize with the specified object and indicates if they are equal.
-
Returns the height of this AdSize in density-independent pixels.
-
Returns the height of this AdSize in physical pixels.
-
Returns the width of this AdSize in density-independent pixels.
-
Returns the width of this AdSize in physical pixels.
-
Returns whether this AdSize is auto-height.
-
Returns whether this AdSize is full-width.
-
- About Android | - Legal | - Support -
-| java.lang.Object | -|||
| ↳ | - -android.view.View | -||
| - - | ↳ | - -android.view.ViewGroup | -|
| - - | - - | ↳ | - -com.google.android.gms.ads.AdView | -
The View to display banner ads. The ad size and ad unit ID must be set
- prior to calling loadAd(AdRequest).
-
- Publishers using DoubleClick for Publishers or Search Ads for Apps should use
- PublisherAdView or
- SearchAdView, respectively.
-
- Sample code: -
- public class MyActivity extends Activity {
- private AdView mAdView;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- LinearLayout layout = new LinearLayout(this);
- layout.setOrientation(LinearLayout.VERTICAL);
-
- // Create a banner ad. The ad size and ad unit ID must be set before calling loadAd.
- mAdView = new AdView(this);
- mAdView.setAdSize(AdSize.SMART_BANNER);
- mAdView.setAdUnitId("myAdUnitId");
-
- // Create an ad request.
- AdRequest.Builder adRequestBuilder = new AdRequest.Builder();
-
- // Optionally populate the ad request builder.
- adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
-
- // Add the AdView to the view hierarchy.
- layout.addView(mAdView);
-
- // Start loading the ad.
- mAdView.loadAd(adRequestBuilder.build());
-
- setContentView(layout);
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- // Resume the AdView.
- mAdView.resume();
- }
-
- @Override
- public void onPause() {
- // Pause the AdView.
- mAdView.pause();
-
- super.onPause();
- }
-
- @Override
- public void onDestroy() {
- // Destroy the AdView.
- mAdView.destroy();
-
- super.onDestroy();
- }
- }
-
-
-
-
-
-| XML Attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| com.google.android.gms:adSize | -- setAdSize(AdSize) - - | -- - - - - | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| com.google.android.gms:adUnitId | -- setAdUnitId(String) - - | -- - - - - | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- [Expand]
- Inherited Constants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- From class
-android.view.ViewGroup
-
-
-
-
-
-
-
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
- From class
-android.view.View
-
-
-
-
-
-
-
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- [Expand]
- Inherited Fields | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- From class
-android.view.View
-
-
-
-
-
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Construct an
-
- AdView from code.
-
-
-
- | |||||||||||
- Construct an
-
- AdView from an XML layout.
-
-
-
- | |||||||||||
- Construct an
-
- AdView from an XML layout.
-
-
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Destroy the
-
- AdView.
-
-
-
- | |||||||||||
- Returns the
-
- AdListener for this AdView.
-
-
-
- | |||||||||||
- Returns the size of the banner ad.
-
-
-
-
-
- | |||||||||||
- Returns the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Returns the
-
- InAppPurchaseListener for this AdView.
-
-
-
- | |||||||||||
- Returns the mediation adapter class name.
-
-
-
-
-
- | |||||||||||
- Starts loading the ad on a background thread.
-
-
-
-
-
- | |||||||||||
- Pauses any extra processing associated with this
-
- AdView.
-
-
-
- | |||||||||||
- Sets an
-
- AdListener for this AdView.
-
-
-
- | |||||||||||
- Sets the size of the banner ad.
-
-
-
-
-
- | |||||||||||
- Sets the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Sets an
-
- InAppPurchaseListener for this AdView.
-
-
-
- | |||||||||||
- Set a
-
- PlayStorePurchaseListener and app's public key for this AdView.
-
-
-
- | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- android.view.ViewGroup
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- android.view.View
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.ViewParent
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.ViewManager
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.graphics.drawable.Drawable.Callback
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.KeyEvent.Callback
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.accessibility.AccessibilityEventSource
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Construct an AdView from an XML layout.
-
Construct an AdView from an XML layout.
-
Destroy the AdView. This method should be called in the parent Activity's
- onDestroy() method. No other methods should be called on the
- AdView after destroy() is called.
-
Returns the AdListener for this AdView.
-
Returns the size of the banner ad. Returns null if setAdSize(AdSize) hasn't been
- called yet.
Returns the ad unit ID.
Returns the InAppPurchaseListener for this AdView. Returns
- null if it is not set.
-
Returns the mediation adapter class name. In the case of a mediated ad response, this is the
- name of the class that was responsible for performing the ad request and rendering the ad.
- For non-mediated responses, this value will be null.
-
Starts loading the ad on a background thread.
| IllegalStateException - | If the size of the banner ad or the ad unit ID have not been - set. - | -
|---|
Resumes an AdView after a previous call to pause(). This method should be
- called in the parent Activity's onResume() method.
-
Sets an AdListener for this AdView.
-
Sets the size of the banner ad.
| IllegalStateException - | If the size of the banner ad was already set. - | -
|---|
Sets the ad unit ID.
| IllegalStateException - | If the ad unit ID was already set. - | -
|---|
Sets an InAppPurchaseListener for this AdView. null is acceptable but
- InAppPurchaseListener is not set in this case.
| IllegalStateException - | If
- setPlayStorePurchaseParams(PlayStorePurchaseListener, String) was already called.
- |
-
|---|
Set a PlayStorePurchaseListener and app's public key for this AdView.
- null for parameter palyStorePurchaseListener is acceptable but
- PlayStorePurchaseListener is not set in this case.
- null for parameter publicKey is acceptable but SDK will work in developer mode and
- skip verifying purchase data signature with public key.
| IllegalStateException - | If setInAppPurchaseListener(InAppPurchaseListener) was
- already called.
- |
-
|---|
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.InterstitialAd | -
Full-screen interstitial ads. The ad unit ID must be set prior to calling loadAd(AdRequest).
-
- Publishers using DoubleClick for Publishers should use
- PublisherInterstitialAd.
-
- Sample code: -
- public class MyActivity extends Activity {
- private InterstitialAd mInterstitialAd;
- private Button mNextLevelButton;
- private TextView mTextView;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- // Create an interstitial ad. When a natural transition in the app occurs (such as a
- // level ending in a game), show the interstitial. In this simple example, the press of a
- // button is used instead.
- //
- // If the button is clicked before the interstitial is loaded, the user should proceed to
- // the next part of the app (in this case, the next level).
- //
- // If the interstitial is finished loading, the user will view the interstitial before
- // proceeding.
- mInterstitialAd = new InterstitialAd(this);
- mInterstitialAd.setAdUnitId("myAdUnitId");
-
- // Create an ad request.
- AdRequest.Builder adRequestBuilder = new AdRequest.Builder();
-
- // Optionally populate the ad request builder.
- adRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
-
- // Set an AdListener.
- mInterstitialAd.setAdListener(new AdListener() {
- @Override
- public void onAdLoaded() {
- Toast.makeText(MyActivity.this,
- "The interstitial is loaded", Toast.LENGTH_SHORT).show();
- }
-
- @Override
- public void onAdClosed() {
- // Proceed to the next level.
- goToNextLevel();
- }
- });
-
- // Start loading the ad now so that it is ready by the time the user is ready to go to
- // the next level.
- mInterstitialAd.loadAd(adRequestBuilder.build());
-
- // Create the button to go to the next level.
- mNextLevelButton = new Button(this);
- mNextLevelButton.setText("Next Level");
- mNextLevelButton.setOnClickListener(new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- // Show the interstitial if it is ready. Otherwise, proceed to the next level
- // without ever showing it.
- if (mInterstitialAd.isLoaded()) {
- mInterstitialAd.show();
- } else {
- // Proceed to the next level.
- goToNextLevel();
- }
- }
- });
-
- // Add the next level button to the layout.
- LinearLayout layout = new LinearLayout(this);
- layout.setOrientation(LinearLayout.VERTICAL);
- layout.addView(mNextLevelButton);
-
- // Create a TextView to display the current level.
- mTextView = new TextView(this);
- mTextView.setText("Level 1");
- layout.addView(mTextView);
-
- setContentView(layout);
- }
-
- public void goToNextLevel() {
- // Show the next level (and disable the next level button since there are no more levels.
- mNextLevelButton.setEnabled(false);
- mTextView.setText("Level 2");
- }
- }
-
-
-
-
-
-
-| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Construct an
-
- InterstitialAd.
-
-
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Returns the
-
- AdListener for this InterstitialAd.
-
-
-
- | |||||||||||
- Returns the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Returns the
-
- InAppPurchaseListener for this InterstitialAd.
-
-
-
- | |||||||||||
- Returns the mediation adapter class name.
-
-
-
-
-
- | |||||||||||
- Returns
-
- true if the ad was successfully loaded and is ready to be shown.
-
-
-
- | |||||||||||
- Start loading the ad on a background thread.
-
-
-
-
-
- | |||||||||||
- Sets an
-
- AdListener for this InterstitialAd.
-
-
-
- | |||||||||||
- Sets the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Set a
-
- InAppPurchaseListener for this InterstitialAd.
-
-
-
- | |||||||||||
- Set an
-
- PlayStorePurchaseListener and app's public key for this
- InterstitialAd.
-
-
-
- | |||||||||||
- Show the interstitial ad.
-
-
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Construct an InterstitialAd.
-
Returns the AdListener for this InterstitialAd.
-
Returns the ad unit ID. -
Returns the InAppPurchaseListener for this InterstitialAd. Returns
- null if it is not set.
-
Returns the mediation adapter class name. In the case of a mediated ad response, this is the
- name of the class that was responsible for performing the ad request and rendering the ad.
- For non-mediated responses, this value will be null.
-
Returns true if the ad was successfully loaded and is ready to be shown.
-
Start loading the ad on a background thread.
| IllegalStateException - | If the the ad unit ID has not been set. - | -
|---|
Sets an AdListener for this InterstitialAd.
-
Sets the ad unit ID.
| IllegalStateException - | If the ad unit ID was already set. - | -
|---|
Set a InAppPurchaseListener for this InterstitialAd. null is
- acceptable but InAppPurchaseListener is not set in this case.
| IllegalStateException - | If
- setPlayStorePurchaseParams(PlayStorePurchaseListener, String) was already called.
- |
-
|---|
Set an PlayStorePurchaseListener and app's public key for this
- InterstitialAd. null for parameter palyStorePurchaseListener is acceptable
- but PlayStorePurchaseListener is not set in this case.
- null for parameter publicKey is acceptable but SDK will work in developer mode and
- skip verifying purchase data signature with public key.
| IllegalStateException - | If setInAppPurchaseListener(InAppPurchaseListener) was
- already called.
- |
-
|---|
Show the interstitial ad. -
- About Android | - Legal | - Support -
-| com.google.android.gms.ads.doubleclick.AppEventListener | -
A listener interface for app events triggered by ads. App events allow JavaScript within an ad to - trigger events in the application. The ad can trigger the app event with a name and optional - data. It is then up to the application to decide how to handle the event. -
- - - - - -| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Called when an app event occurs.
-
-
-
-
-
- | |||||||||||
Called when an app event occurs.
| name - | The name of the app event. | -
|---|---|
| data - | Extra data included with the app event. The data can be null.
- |
-
- About Android | - Legal | - Support -
-| com.google.android.gms.ads.doubleclick.CustomRenderedAd | -
Interface that contains information about custom rendered ads. -
- - - - - -| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Returns the base URL as a String value.
-
-
-
-
-
- | |||||||||||
- Returns the ad content string.
-
-
-
-
-
- | |||||||||||
- Notifies the SDK that ad has finished rendering.
-
-
-
-
-
- | |||||||||||
- Records the click of the ad.
-
-
-
-
-
- | |||||||||||
- Records the impression of the ad.
-
-
-
-
-
- | |||||||||||
Returns the base URL as a String value. The base URL can be used to get an absolute path when - the ad content assets use relative links. -
Returns the ad content string. This can be an HTML or JSON string, or any server template - which contains assets for the ad. -
Notifies the SDK that ad has finished rendering.
| view - | The rendered view of the ad. - | -
|---|
Records the click of the ad. -
Records the impression of the ad. -
- About Android | - Legal | - Support -
-| com.google.android.gms.ads.doubleclick.OnCustomRenderedAdLoadedListener | -
A listener for when a custom rendered ad has loaded. -
- - - - - -| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Called when a
-
- CustomRenderedAd has loaded.
-
-
-
- | |||||||||||
Called when a CustomRenderedAd has loaded. Publishers should render the ad, and call
- onAdRendered(View) when the rendering is complete.
-
| ad - | The CustomRenderedAd which contains information about this ad.
- |
-
|---|
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.doubleclick.PublisherAdRequest.Builder | -
Builds a PublisherAdRequest.
-
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Sets a slot-level ad category exclusion label.
-
-
-
-
-
- | |||||||||||
- Add extra parameters to pass to a specific custom event adapter.
-
-
-
-
-
- | |||||||||||
- Adds a custom targeting parameter.
-
-
-
-
-
- | |||||||||||
- Adds a custom targeting parameter.
-
-
-
-
-
- | |||||||||||
- Add a keyword for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Add extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Add extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Causes a device to receive test ads.
-
-
-
-
-
- | |||||||||||
- Constructs
-
- PublisherAdRequest with the specified attributes.
-
-
-
- | |||||||||||
- Sets the user's birthday for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the content URL for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the user's gender for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Sets the user's location for targeting purposes.
-
-
-
-
-
- | |||||||||||
- Enables manual impression reporting.
-
-
-
-
-
- | |||||||||||
- Sets an identifier for use in frequency capping, audience segmentation and targeting,
- sequential ad rotation, and other audience-based ad delivery controls across devices.
-
-
-
-
-
- | |||||||||||
- Sets the request agent string to identify the ad request's origin.
-
-
-
-
-
- | |||||||||||
- This method allows you to specify whether you would like your app to be treated as
- child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) -
-
- http://business.ftc.gov/privacy-and-security/childrens-privacy.
-
-
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Sets a slot-level ad category exclusion label. -
Adds a custom targeting parameter. Calling this multiple times for the - same key will overwrite old values. -
Adds a custom targeting parameter. Calling this multiple times for the - same key will overwrite old values. -
Add a keyword for targeting purposes. -
Add extra parameters to pass to a specific ad network adapter. networkExtras
- should be an instance of com.google.ads.mediation.NetworkExtras, which is
- provided by ad network adapters.
-
Causes a device to receive test ads. The deviceId can be obtained by viewing the
- logcat output after creating a new ad. For emulators, use
- DEVICE_ID_EMULATOR.
-
Constructs PublisherAdRequest with the specified attributes.
-
Sets the user's birthday for targeting purposes. -
Sets the content URL for targeting purposes.
| NullPointerException - | If contentUrl is {code null}. | -
|---|---|
| IllegalArgumentException - | If contentUrl is empty, or if its - length exceeds 512. - | -
Sets the user's gender for targeting purposes. This should be
- GENDER_MALE, GENDER_FEMALE, or GENDER_UNKNOWN.
-
Sets the user's location for targeting purposes. -
Enables manual impression reporting. -
Sets an identifier for use in frequency capping, audience segmentation and targeting, - sequential ad rotation, and other audience-based ad delivery controls across devices. -
Sets the request agent string to identify the ad request's origin. Third party libraries - that reference the Mobile Ads SDK should call this method to denote the platform from - which the ad request originated. For example, if a third party ad network called - "CoolAds network" mediates requests to the Mobile Ads SDK, it should call this method - with "CoolAds". -
This method allows you to specify whether you would like your app to be treated as - child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA) - - - http://business.ftc.gov/privacy-and-security/childrens-privacy. -
- If you set this method to true, you will indicate that your app should be treated
- as child-directed for purposes of the Children’s Online Privacy Protection Act (COPPA).
-
- If you set this method to false, you will indicate that your app should not be
- treated as child-directed for purposes of the Children’s Online Privacy Protection Act
- (COPPA).
-
- If you do not set this method, ad requests will include no indication of how you would - like your app treated with respect to COPPA. -
- By setting this method, you certify that this notification is accurate and you are - authorized to act on behalf of the owner of the app. You understand that abuse of this - setting may result in termination of your Google account. -
- Note: it may take some time for this designation to be fully implemented in applicable - Google services. -
- This designation will only apply to ad requests for which you have set this method.
| tagForChildDirectedTreatment - | Set to true to indicate that your app should
- be treated as child-directed. Set to false to indicate that your app
- should not be treated as child-directed.
- |
-
|---|
- About Android | - Legal | - Support -
-| java.lang.Object | -|
| ↳ | - -com.google.android.gms.ads.doubleclick.PublisherAdRequest | -
A PublisherAdRequest contains targeting information used to fetch an ad from DoubleClick
- for Publishers. Ad requests are created using PublisherAdRequest.Builder.
-
| Nested Classes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PublisherAdRequest.Builder | -
- Builds a PublisherAdRequest.
-
-
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | -ERROR_CODE_INTERNAL_ERROR | -- Something happened internally; for instance, an invalid response was received from the ad - server. - - - - | -|||||||||
| int | -ERROR_CODE_INVALID_REQUEST | -- The ad request was invalid; for instance, the ad unit ID was incorrect. - - - - | -|||||||||
| int | -ERROR_CODE_NETWORK_ERROR | -- The ad request was unsuccessful due to network connectivity. - - - - | -|||||||||
| int | -ERROR_CODE_NO_FILL | -- The ad request was successful, but no ad was returned due to lack of ad inventory. - - - - | -|||||||||
| int | -GENDER_FEMALE | -- Female gender. - - - - | -|||||||||
| int | -GENDER_MALE | -- Male gender. - - - - | -|||||||||
| int | -GENDER_UNKNOWN | -- Unknown gender. - - - - | -|||||||||
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEVICE_ID_EMULATOR | -
- The deviceId for emulators to be used with
- addTestDevice(String).
-
-
-
- |
- ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Returns the user's birthday targeting information.
-
-
-
-
-
- | |||||||||||
- Returns the content url targeting information.
-
-
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific custom event adapter.
-
-
-
-
-
- | |||||||||||
- Returns the custom targeting parameters.
-
-
-
-
-
- | |||||||||||
- Returns the user's gender targeting information.
-
-
-
-
-
- | |||||||||||
- Returns targeting information keywords.
-
-
-
-
-
- | |||||||||||
- Returns the user's location targeting information.
-
-
-
-
-
- | |||||||||||
- Returns
-
- true if manual impression reporting is enabled.
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Returns extra parameters to pass to a specific ad network adapter.
-
-
-
-
-
- | |||||||||||
- Returns the identifier used for frequency capping, audience segmentation and targeting,
- sequential ad rotation, and other audience-based ad delivery controls across devices.
-
-
-
-
-
- | |||||||||||
- Returns
-
- true if this device will receive test ads.
-
-
-
- | |||||||||||
- Changes the correlator that is sent with ad requests, effectively starting a new page view.
-
-
-
-
-
- | |||||||||||
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||
Something happened internally; for instance, an invalid response was received from the ad - server. -
The ad request was invalid; for instance, the ad unit ID was incorrect. -
The ad request was unsuccessful due to network connectivity. -
The ad request was successful, but no ad was returned due to lack of ad inventory. -
Female gender.
Male gender.
Unknown gender.
The deviceId for emulators to be used with
- addTestDevice(String).
-
Returns the user's birthday targeting information. Returns null if the birthday was
- not set.
-
Returns the content url targeting information. Returns null if the contentUrl was
- not set.
-
Returns extra parameters to pass to a specific custom event adapter. Returns null if
- no custom event extras of the provided type were set.
-
Returns the custom targeting parameters. -
Returns the user's gender targeting information. Returns -1 if the gender was not
- set.
-
Returns targeting information keywords. Returns an empty Set if no
- keywords were added.
-
Returns the user's location targeting information. Returns null if the location was
- not set.
-
Returns true if manual impression reporting is enabled.
-
Returns extra parameters to pass to a specific ad network adapter. Ad network adapters
- provide a NetworkExtras class. Returns null if no network extras of the
- provided type were set.
-
Returns extra parameters to pass to a specific ad network adapter. Returns null if no
- network extras of the provided type were set.
-
Returns the identifier used for frequency capping, audience segmentation and targeting, - sequential ad rotation, and other audience-based ad delivery controls across devices. -
Returns true if this device will receive test ads.
-
Changes the correlator that is sent with ad requests, effectively starting a new page view. - The correlator is the same for all the ad requests coming from one page view, and unique - across page views. After updating the correlator, ads must be refreshed for the new - correlator to take effect. -
- About Android | - Legal | - Support -
-| java.lang.Object | -|||
| ↳ | - -android.view.View | -||
| - - | ↳ | - -android.view.ViewGroup | -|
| - - | - - | ↳ | - -com.google.android.gms.ads.doubleclick.PublisherAdView | -
The View to display banner ads for use with DoubleClick for Publishers. The
- ad size and ad unit ID must be set prior to calling loadAd(PublisherAdRequest).
-
- Sample code: -
- public class MyActivity extends Activity {
- private PublisherAdView mPublisherAdView;
-
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
-
- LinearLayout layout = new LinearLayout(this);
- layout.setOrientation(LinearLayout.VERTICAL);
-
- // Create a banner ad. The ad size and ad unit ID must be set before calling loadAd.
- mPublisherAdView = new PublisherAdView(this);
- mPublisherAdView.setAdSize(AdSize.SMART_BANNER);
- mPublisherAdView.setAdUnitId("myAdUnitId");
-
- // Create an ad request.
- PublisherAdRequest.Builder publisherAdRequestBuilder = new PublisherAdRequest.Builder();
-
- // Optionally populate the ad request builder.
- publisherAdRequestBuilder.addTestDevice(PublisherAdRequest.DEVICE_ID_EMULATOR);
-
- // Add the PublisherAdView to the view hierarchy.
- layout.addView(mPublisherAdView);
-
- // Start loading the ad.
- mPublisherAdView.loadAd(PublisherAdRequestBuilder.build());
-
- setContentView(layout);
- }
-
- @Override
- public void onResume() {
- super.onResume();
-
- // Resume the PublisherAdView.
- mPublisherAdView.resume();
- }
-
- @Override
- public void onPause() {
- // Pause the PublisherAdView.
- mPublisherAdView.pause();
-
- super.onPause();
- }
-
- @Override
- public void onDestroy() {
- // Destroy the PublisherAdView.
- mPublisherAdView.destroy();
-
- super.onDestroy();
- }
- }
-
-
-
-
-
-| XML Attributes | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| com.google.android.gms:adSizes | -- setAdSizes(AdSize) - - | -- - - - - | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| com.google.android.gms:adUnitId | -- setAdUnitId(String) - - | -- - - - - | -|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- [Expand]
- Inherited Constants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- From class
-android.view.ViewGroup
-
-
-
-
-
-
-
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
- From class
-android.view.View
-
-
-
-
-
-
-
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- [Expand]
- Inherited Fields | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- From class
-android.view.View
-
-
-
-
-
-
-
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Construct an
-
- PublisherAdView from code.
-
-
-
- | |||||||||||
- Construct a
-
- PublisherAdView from an XML layout.
-
-
-
- | |||||||||||
- Construct an
-
- PublisherAdView from an XML layout.
-
-
-
- | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
- Destroy the
-
- PublisherAdView.
-
-
-
- | |||||||||||
- Returns the
-
- AdListener for this PublisherAdView.
-
-
-
- | |||||||||||
- Returns the size of the currently displayed banner ad.
-
-
-
-
-
- | |||||||||||
- Returns the ad sizes supported by this
-
- PublisherAdView.
-
-
-
- | |||||||||||
- Returns the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Returns the
-
- AppEventListener for this PublisherAdView.
-
-
-
- | |||||||||||
- Returns the mediation adapter class name.
-
-
-
-
-
- | |||||||||||
- Returns the
-
- OnCustomRenderedAdLoadedListener for this PublisherAdView.
-
-
-
- | |||||||||||
- Start loading the ad on a background thread.
-
-
-
-
-
- | |||||||||||
- Pause any extra processing associated with this
-
- PublisherAdView.
-
-
-
- | |||||||||||
- Record a manual impression.
-
-
-
-
-
- | |||||||||||
- Resume a
-
- PublisherAdView after a previous call to pause().
-
-
-
- | |||||||||||
- Sets an
-
- AdListener for this PublisherAdView.
-
-
-
- | |||||||||||
- Sets the supported sizes of the banner ad.
-
-
-
-
-
- | |||||||||||
- Sets the ad unit ID.
-
-
-
-
-
- | |||||||||||
- Sets an
-
- AppEventListener for this PublisherAdView.
-
-
-
- | |||||||||||
- Sets an
-
- OnCustomRenderedAdLoadedListener for this PublisherAdView.
-
-
-
- | |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
- [Expand]
- Inherited Methods | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
-From class
-
- android.view.ViewGroup
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- android.view.View
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From class
-
- java.lang.Object
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.ViewParent
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.ViewManager
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.graphics.drawable.Drawable.Callback
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.KeyEvent.Callback
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
-
-From interface
-
- android.view.accessibility.AccessibilityEventSource
-
-
-
-
-
-
-
- | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Construct an PublisherAdView from code.
| context - | The Context the PublisherAdView is running in.
- |
-
|---|
Construct a PublisherAdView from an XML layout.
-
Construct an PublisherAdView from an XML layout.
-
Destroy the PublisherAdView. This method should be called in the parent Activity's
- onDestroy() method. No other methods should be called on the
- PublisherAdView after destroy() is called.
-
Returns the AdListener for this PublisherAdView.
-
Returns the size of the currently displayed banner ad. Returns null if
- setAdSizes(AdSize...) hasn't been called yet. See getAdSizes() for the ad sizes
- supported by this PublisherAdView.
-
Returns the ad sizes supported by this PublisherAdView. See getAdSize() for
- the size of the currently displayed banner ad.
Returns the ad unit ID.
Returns the AppEventListener for this PublisherAdView.
-
Returns the mediation adapter class name. In the case of a mediated ad response, this is the
- name of the class that was responsible for performing the ad request and rendering the ad.
- For non-mediated responses, this value will be null.
-
Returns the OnCustomRenderedAdLoadedListener for this PublisherAdView.
-
Start loading the ad on a background thread.
| IllegalStateException - | If the size of the banner ad or the ad unit ID have not been - set. - | -
|---|
Pause any extra processing associated with this PublisherAdView. This method should
- be called in the parent Activity's onPause() method.
-
Record a manual impression. setManualImpressionsEnabled(boolean)
- must be enabled for this method to have any effect.
-
Resume a PublisherAdView after a previous call to pause(). This method should
- be called in the parent Activity's onResume() method.
-
Sets an AdListener for this PublisherAdView.
-
Sets the supported sizes of the banner ad. In most cases, only one ad size will be specified. -
- Multiple ad sizes can be specified if your application can appropriately handle multiple
- ad sizes. For example, your application might call getAdSize() during the
- onAdLoaded() callback and change the layout according to the size of the ad
- that was loaded. If multiple ad sizes are specified, the PublisherAdView will
- assume the size of the first ad size until an ad is loaded.
-
- This method also immediately resizes the currently displayed ad, so calling this method after an - ad has been loaded is not recommended unless you know for certain that the content of the - ad will render correctly in the new ad size. This can be used if an ad needs to be resized - after it has been loaded. If more than one ad size is specified, the currently displayed ad - will be resized to the first ad size.
| IllegalArgumentException - | If adSizes is null or empty.
- |
-
|---|
Sets the ad unit ID.
| IllegalStateException - | If the ad unit ID was already set. - | -
|---|
Sets an AppEventListener for this PublisherAdView.
-
Sets an OnCustomRenderedAdLoadedListener for this PublisherAdView.
-
- About Android | - Legal | - Support -
-