public
static
@@ -1519,6 +1532,44 @@ containing a value of this type.
+
+
+
+
+
+ public
+ static
+
+ int
+
+ adSizes
+
+
+
+
+
+
+
+
+
+
A comma-separated list of the supported ad sizes. The sizes must be one of
+ BANNER, FULL_BANNER, LEADERBOARD, MEDIUM_RECTANGLE, SMART_BANNER,
+ WIDE_SKYSCRAPER, or <width>x<height>.
+
+
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.
+
+
+
+
+
+
+
+
@@ -2378,6 +2429,8 @@ containing a value of this type.
Constant
Value
Description
match_global_nicknames
1
Enable global nickname matching on this section
demote_common_words
2
Demote common words by a factor in this section
+
demote_rfc822_hostnames
3
Demote RFC822 hostnames by a factor in this section. Only applicable to RFC822
+ sections
@@ -1537,6 +1546,56 @@ containing a value of this type.
+
+
+
+
+
+ public
+ static
+ final
+ int
+
+ AdsAttrs_adSizes
+
+
+
+
+
+
+
+
+
+
A comma-separated list of the supported ad sizes. The sizes must be one of
+ BANNER, FULL_BANNER, LEADERBOARD, MEDIUM_RECTANGLE, SMART_BANNER,
+ WIDE_SKYSCRAPER, or <width>x<height>.
+
+
+
+
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 is a private symbol.
+
+
+
+ Constant Value:
+
+
+ 1
+ (0x00000001)
+
+
+
+
+
+
+
+
+
@@ -1573,8 +1632,8 @@ containing a value of this type.
Constant Value:
- 1
- (0x00000001)
+ 2
+ (0x00000002)
@@ -2912,6 +2971,8 @@ containing a value of this type.
Constant
Value
Description
match_global_nicknames
1
Enable global nickname matching on this section
demote_common_words
2
Demote common words by a factor in this section
+
demote_rfc822_hostnames
3
Demote RFC822 hostnames by a factor in this section. Only applicable to RFC822
+ sections
This is a private symbol.
@@ -3351,11 +3412,13 @@ containing a value of this type.
Compares this AdSize with the specified object and indicates if they are equal.
+
@@ -1607,7 +1611,7 @@ From class
IAB wide skyscraper ad size (160x600 density-independent pixels). This size is currently not
- supported by the Google Ads network; this is intended for mediation ad networks only.
+ supported by the Google Mobile Ads network; this is intended for mediation ad networks only.
@@ -1715,7 +1719,8 @@ From class
-
+
Compares this AdSize with the specified object and indicates if they are equal.
+
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.
+
Sets an identifier for use in frequency capping, audience segmentation and targeting,
+ sequential ad rotation, and other audience-based ad delivery controls across devices.
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.
+
Sets an identifier for use in frequency capping, audience segmentation and targeting,
+ sequential ad rotation, and other audience-based ad delivery controls across devices.
+
+ 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.
+
+
Parameters
+
+
+
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.
+
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 manual impression reporting is enabled.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ T
+
+ getNetworkExtras
+ (Class<T> networkExtrasClass)
+
+
+
+
+
+
+
+
+
+
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 the identifier used for frequency capping, audience segmentation and targeting,
+ sequential ad rotation, and other audience-based ad delivery controls across devices.
+
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();
+ }
+ }
A comma-separated list of the supported ad sizes. The sizes must be one of
+ BANNER, FULL_BANNER, LEADERBOARD, MEDIUM_RECTANGLE, SMART_BANNER,
+ WIDE_SKYSCRAPER, or <width>x<height>.
+
+
+
+
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.
+
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.
Full-screen interstitial ads for use with DoubleClick for Publishers. The ad unit ID must be set
+ prior to calling loadAd(PublisherAdRequest).
+
+ Sample code:
+
+ public class MyActivity extends Activity {
+ private PublisherInterstitialAd mPublisherInterstitialAd;
+ 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.
+ mPublisherInterstitialAd = new PublisherInterstitialAd(this);
+ mPublisherInterstitialAd.setAdUnitId("myAdUnitId");
+
+ // Create an ad request.
+ PublisherAdRequest.Builder publisherAdRequestBuilder = new PublisherAdRequest.Builder();
+
+ // Optionally populate the ad request builder.
+ publisherAdRequestBuilder.addTestDevice(PublisherAdRequest.DEVICE_ID_EMULATOR);
+
+ // Set an AdListener.
+ mPublisherInterstitialAd.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.
+ mPublisherInterstitialAd.loadAd(publisherAdRequestBuilder.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 (mPublisherInterstitialAd.isLoaded()) {
+ mPublisherInterstitialAd.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");
+ }
+ }
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.
+
Sets custom channels for the ad request. Custom channels allow publishers to track the
+ performance of specific groups of ads. These custom channels need to created on the
+ AdSense website. Reports can then be created based on the channels.
Sets the font used to render the ad. The same font is used in the header, the description
+ and the anchor. Fonts are specified using the same value that would be used in CSS (e.g.,
+ "arial").
+
+ 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.
+
+
Parameters
+
+
+
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.
+
A SearchAdRequest contains targeting information used to fetch an ad from Search Ads for
+ Apps. Ad requests are created using SearchAdRequest.Builder.
+
Returns the custom channels for the ad request. Custom channels allow publishers to track the
+ performance of specific groups of ads. These custom channels need to created on the AdSense
+ website. Reports can then be created based on the channels.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ int
+
+ getDescriptionTextColor
+ ()
+
Returns the user's location targeting information. Returns null if the location was
+ not set.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ T
+
+ getNetworkExtras
+ (Class<T> networkExtrasClass)
+
+
+
+
+
+
+
+
+
+
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.
+
The View to display search banner ads for use with Search Ads for Apps. The
+ ad size and ad unit ID must be set prior to calling loadAd(SearchAdRequest).
+
+ Sample code:
+
+ public class MyActivity extends Activity {
+ private SearchAdView mSearchAdView;
+
+ @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.
+ mSearchAdView = new SearchAdView(this);
+ mSearchAdView.setAdSize(AdSize.SMART_BANNER);
+ mSearchAdView.setAdUnitId("myAdUnitId");
+
+ // Create an ad request.
+ SearchAdRequest.Builder searchAdRequestBuilder = new SearchAdRequest.Builder();
+
+ // Optionally populate the ad request builder.
+ searchAdRequestBuilder.addTestDevice(AdRequest.DEVICE_ID_EMULATOR);
+
+ // Add the SearchAdView to the view hierarchy.
+ layout.addView(mSearchAdView);
+
+ // Start loading the ad.
+ mSearchAdView.loadAd(searchAdRequestBuilder.build());
+
+ setContentView(layout);
+ }
+
+ @Override
+ public void onResume() {
+ super.onResume();
+
+ // Resume the SearchAdView.
+ mSearchAdView.resume();
+ }
+
+ @Override
+ public void onPause() {
+ // Pause the SearchAdView.
+ mSearchAdView.pause();
+
+ super.onPause();
+ }
+
+ @Override
+ public void onDestroy() {
+ // Destroy the SearchAdView.
+ mSearchAdView.destroy();
+
+ super.onDestroy();
+ }
+ }
The size of the ad. It must be one of BANNER, FULL_BANNER, LEADERBOARD,
+ MEDIUM_RECTANGLE, SMART_BANNER, WIDE_SKYSCRAPER, or
+ <width>x<height>.
+
+
+
+
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.
+
Destroy the SearchAdView. This method should be called in the parent Activity's
+ onDestroy() method. No other methods should be called on the
+ SearchAdView after destroy() is called.
+
STATUS_OK if data was successfully deleted from the server.
STATUS_NETWORK_ERROR_OPERATION_FAILED if the device was unable to
communicate with the network. In this case, the operation is not retried automatically.
Called when a conflict is detected while loading app state. To resolve the conflict, call
- resolveState(OnStateLoadedListener, int, String, byte[]) with the new
- desired data and the value of resolvedVersion provided here.
STATUS_STATE_KEY_NOT_FOUND if the requested state key is not found
diff --git a/docs/html/reference/com/google/android/gms/appstate/package-summary.html b/docs/html/reference/com/google/android/gms/appstate/package-summary.html
index 50ef3d7f440a..4fa538166d81 100644
--- a/docs/html/reference/com/google/android/gms/appstate/package-summary.html
+++ b/docs/html/reference/com/google/android/gms/appstate/package-summary.html
@@ -243,6 +243,8 @@ onkeyup="return search_changed(event, false, '/')" />
Describes a section of the Google Play Services API that should be made available.
+ Instances of this should be passed into addApi(Api) to enable the
+ appropriate parts of Google Play Services.
+
+ Google APIs are partitioned into sections which allow your application to configure only the
+ services it requires. Each Google API provides an API object which can be passed to
+ addApi(Api) in order to configure and enable that functionality
+ in your GoogleApiClient instance.
+
Base interface for API options. These are used to configure specific parameters for
+ individual API surfaces. The default implementation has no parameters.
+
Specifies the part of the screen at which games service popups (for example, "welcome
+ back" or "achievement unlocked" popups) will be displayed using gravity.
Registers a listener to receive connection events from this GoogleApiClient.
+ Applications should balance calls to this method with calls to
+ unregisterConnectionCallbacks(ConnectionCallbacks) to avoid leaking resources.
+
+ If the specified listener is already registered to receive connection events, this
+ method will not add a duplicate entry for the same listener.
+
+ Note that the order of messages received here may not be stable, so clients should not
+ rely on the order that multiple listeners receive events in.
+
+
Parameters
+
+
+
listener
+
the listener where the results of the asynchronous connect() call
+ are delivered.
+
Adds a listener to register to receive connection failed events from this
+ GoogleApiClient. Applications should balance calls to this method with calls to
+ unregisterConnectionFailedListener(OnConnectionFailedListener) to avoid leaking
+ resources.
+
+ If the specified listener is already registered to receive connection failed events, this
+ method will not add a duplicate entry for the same listener.
+
+ Note that the order of messages received here may not be stable, so clients should not
+ rely on the order that multiple listeners receive events in.
+
+
Parameters
+
+
+
listener
+
the listener where the results of the asynchronous connect() call
+ are delivered.
+
Specify an account name on the device that should be used. If this is never called, the
+ client will use the current default account for Google Play services for this
+ application.
+
+
Parameters
+
+
+
accountName
+
The account name on the device that should be used by
+ GoogleApiClient.
+
Specifies the part of the screen at which games service popups (for example, "welcome
+ back" or "achievement unlocked" popups) will be displayed using gravity.
+
Provides callbacks that are called when the client is connected or disconnected from the
+ service. Most applications implement
+ onConnected(Bundle) to start making
+ requests.
+
Provides callbacks for scenarios that result in a failed attempt to
+ connect the client to the service. See ConnectionResult
+ for a list of error codes and suggestions for resolution.
+
+ The GoogleApiClient API is currently in developer
+ preview. Applications compiled using this version of the API will
+ continue to operate on devices using future versions of Google Play services;
+ however, changes to the API are expected in future releases.
+
+
The main entry point for Google Play services integration.
+
+ GooglePlayServicesClient is used with a variety of static methods. Some of these methods
+ require that GoogleApiClient be connected, some will queue up calls before
+ GoogleApiClient is connected; check the specific API documentation to determine
+ whether you need to be connected.
+
+ Before any operation is executed, the GoogleApiClient must be connected using the
+ connect() method. The client is not considered connected until the
+ onConnected(Bundle) callback has been called.
+
+ When your app is done using this client, call disconnect(), even if the async result from
+ connect() has not yet been delivered.
+
Connects the client to Google Play services. This method returns immediately, and connects to
+ the service in the background. If the connection is successful,
+ onConnected(Bundle) is called and enqueued items are executed. On a
+ failure, onConnectionFailed(ConnectionResult) is called.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+ void
+
+ disconnect
+ ()
+
+
+
+
+
+
+
+
+
+
Closes the connection to Google Play services. No calls can be made using this client after
+ calling this method. Any queued tasks will be cleared and the tasks and callbacks will never
+ be executed.
Checks if the client is currently connected to the service, so that requests to other methods
+ will succeed. Applications should guard client actions caused by the user with a call to
+ this method.
Registers a listener to receive connection events from this GoogleApiClient.
+ If the service is already connected, the listener's onConnected(Bundle)
+ method will be called immediately. Applications should balance calls to this method with
+ calls to unregisterConnectionCallbacks(ConnectionCallbacks) to avoid leaking
+ resources.
+
+ If the specified listener is already registered to receive connection events, this
+ method will not add a duplicate entry for the same listener, but will
+ still call the listener's onConnected(Bundle) method if currently
+ connected.
+
+ Note that the order of messages received here may not be stable, so clients should not rely
+ on the order that multiple listeners receive events in.
+
+
Parameters
+
+
+
listener
+
the listener where the results of the asynchronous connect() call are
+ delivered.
+
+ If the specified listener is already registered to receive connection failed events, this
+ method will not add a duplicate entry for the same listener.
+
+ Note that the order of messages received here may not be stable, so clients should not rely
+ on the order that multiple listeners receive events in.
+
+
Parameters
+
+
+
listener
+
the listener where the results of the asynchronous connect() call are
+ delivered.
+
Represents a pending result from calling an API method in Google Play services. The final result
+ object from a PendingResult is of class R, which can be retrieved in one of two ways.
+
via a callback by passing in an object implementing interface C to
+ addResultCallback(C).
+
+
+ Some method calls may hold resources that need to be closed (e.g. any DataBuffer in the
+ result). Resources can be released individually, or all resources that are part of the final
+ result can be released by calling release(). Note it is safe to release resources
+ before the final results.
+
Add your callback here if you want the result to be delivered via a callback when the
+ result is ready.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+ abstract
+
+ R
+
+ await
+ ()
+
+
+
+
+
+
+
+
+
+
Blocks until the task is completed. This is not allowed on the UI thread. The returned
+ result object can have an additional failure mode of INTERRUPTED.
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+ abstract
+
+ R
+
+ await
+ (long time, TimeUnit units)
+
+
+
+
+
+
+
+
+
+
Blocks until the task is completed or has timed out waiting for the result. This is not
+ allowed on the UI thread. The returned result object can have an additional failure mode of
+ INTERRUPTED.
+