public final class AdvertisingIdClient
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AdvertisingIdClient.AdInfo
Static class AdInfo is used to maintain advertising information
|
| Constructor and Description |
|---|
AdvertisingIdClient() |
| Modifier and Type | Method and Description |
|---|---|
static AdvertisingIdClient.AdInfo |
getAdvertisingIdInfo(android.content.Context context)
Fetch the advertising info object synchronously and returns,
it saves the advertisement id and Opt-out state in shared preference of the application.
|
public static AdvertisingIdClient.AdInfo getAdvertisingIdInfo(android.content.Context context) throws java.lang.Exception
context - context objectjava.lang.Exception - Throws IllegalStateException if called from main thread. Throws
IOException if unable to make connection with google play service i.e. unavailable.