This class is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration guide
for details on how to migrate to Firebase Instance ID.
Instance ID provides a unique identifier for each app instance and a mechanism to authenticate and authorize actions (for example, sending a GCM message).
Instance ID is stable but may become invalid, if:
getId() to
request a new Instance ID. To prove ownership of Instance ID and to allow servers to access
data or services associated with the app, call
getToken(String, String).
| String | ERROR_MAIN_THREAD | Blocking methods must not be called on the main thread. |
| String | ERROR_MISSING_INSTANCEID_SERVICE | Tokens can't be generated. |
| String | ERROR_SERVICE_NOT_AVAILABLE | The device cannot read the response, or there was a server error. |
| String | ERROR_TIMEOUT | Timeout waiting for a response. |
| void |
deleteInstanceID()
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| void |
deleteToken(String
authorizedEntity, String scope)
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| long |
getCreationTime()
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| String |
getId()
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| static InstanceID |
getInstance(Context
context)
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| String |
getToken(String
authorizedEntity, String scope)
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
| String |
getToken(String
authorizedEntity, String scope,
Bundle
extras)
This method is deprecated. Instance ID is deprecated and replaced by
Firebase Instance ID. See the FCM
migration guide for details on how to migrate to Firebase Instance ID.
|
Blocking methods must not be called on the main thread.
Tokens can't be generated. Only devices with Google Play are supported.
The device cannot read the response, or there was a server error. Application should retry the request later using exponential backoff and retry (on each subsequent failure increase delay before retrying).
Timeout waiting for a response.
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Resets Instance ID and revokes all tokens.
| IOException |
|---|
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Revokes access to a scope (action) for an entity previously authorized by
getToken(String, String).
Do not call this function on the main thread.
| authorizedEntity | Entity that must no longer have access. |
|---|---|
| scope | Action that entity is no longer authorized to perform. |
| IOException | if the request fails. |
|---|
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Returns time when instance ID was created.
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Returns a stable identifier that uniquely identifies the app instance.
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Returns an instance of this class.
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Returns a token that authorizes an Entity (example: cloud service) to perform an action on behalf of the application identified by Instance ID.
This is similar to an OAuth2 token except, it applies to the application instance instead of a user.
Do not call this function on the main thread.
| authorizedEntity | Entity authorized by the token. |
|---|---|
| scope | Action authorized for authorizedEntity. |
| IOException | if the request fails. |
|---|
This method is deprecated.
Instance ID is deprecated and replaced by Firebase Instance ID. See the FCM migration
guide for details on how to migrate to Firebase Instance ID.
Returns a token that authorizes an Entity (example: cloud service) to perform an action on behalf of the application identified by Instance ID.
This is similar to an OAuth2 token except, it applies to the application instance instead of a user.
Do not call this function on the main thread.
| authorizedEntity | Entity authorized by the token. |
|---|---|
| scope | Action authorized for authorizedEntity. |
| extras | additional parameters specific to each token scope. Bundle keys starting with 'GCM.' and 'GOOGLE.' are reserved. |
| IOException | if the request fails. |
|---|