◆ getFCMPushToken()
String io.agora.push.PushHelper.getFCMPushToken |
( |
| ) |
|
Gets the FCM's push token.
- Returns
- The FCM's push token.
◆ getInstance()
static PushHelper io.agora.push.PushHelper.getInstance |
( |
| ) |
|
|
static |
◆ getPushToken()
String io.agora.push.PushHelper.getPushToken |
( |
| ) |
|
Gets the push token.
- Returns
- The push token.
◆ getPushTokenWithType()
String io.agora.push.PushHelper.getPushTokenWithType |
( |
PushType |
type | ) |
|
Gets the push token with the push type.
- Parameters
-
- Returns
- The push token.
◆ getPushType()
PushType io.agora.push.PushHelper.getPushType |
( |
| ) |
|
Gets the push type.
- Returns
- The push type.
◆ init()
void io.agora.push.PushHelper.init |
( |
Context |
context, |
|
|
PushConfig |
config |
|
) |
| |
Initializes the PushHelper.
- Parameters
-
context | The context of Android Activity or Application. |
config | The Push configurations. |
◆ onErrorResponse()
void io.agora.push.PushHelper.onErrorResponse |
( |
PushType |
type, |
|
|
long |
resultCode |
|
) |
| |
Occurs when a push error occurs. The SDK triggers this callback when a push error, such as push token binding failure (PUSH_BIND_FAILED), push token unbinding failure (PUSH_UNBIND_FAILED), or unsupported custom types (PUSH_NOT_SUPPORT), occurs. You can have more detailed information on the error from the returned resultCode. If the customized PushListener is not null, pass error info to PushListener#onError(PushType, long).
- Parameters
-
type | The push type. |
resultCode | The error code. |
◆ onReceiveToken()
void io.agora.push.PushHelper.onReceiveToken |
( |
PushType |
type, |
|
|
final String |
token |
|
) |
| |
Receives and uploads the device token。
- Parameters
-
type | The push type. |
token | The device token. |
◆ register()
void io.agora.push.PushHelper.register |
( |
| ) |
|
Registers the push service. After successful login, the SDK calls the method instead of you.
◆ setFCMPushToken()
void io.agora.push.PushHelper.setFCMPushToken |
( |
String |
token | ) |
|
Saves the FCM's push token.
- Returns
- The FCM's push token.
◆ setPushListener()
void io.agora.push.PushHelper.setPushListener |
( |
PushListener |
callback | ) |
|
Sets the push listener. You can override PushListener#isSupportPush(PushType, PushConfig) to set the push types. Supported push types are PushType.FCM,PushType.MIPUSH,PushType.HMSPUSH,PushType.MEIZUPUSH,PushType.OPPOPUSH,PushType.VIVOPUSH. If you set a push type beyond this scope, the SDK will choose the Normal push of the chat service without error information without reporting error information.
- Parameters
-
callback | The push listener. |
◆ setPushTokenWithType()
void io.agora.push.PushHelper.setPushTokenWithType |
( |
PushType |
type, |
|
|
final String |
token |
|
) |
| |
Sets the push token with the push type.
- Parameters
-
type | The push type. |
token | The push token. |
◆ unregister()
boolean io.agora.push.PushHelper.unregister |
( |
boolean |
unbindToken | ) |
|
Unregisters the push service. This method is called by SDK during the call of ChatClient#logout(boolean)}.
- Parameters
-
unbindToken | Whether to unbind the device. |
- Returns
- Whether the unregistering push succeeds.
The documentation for this class was generated from the following file:
- io/agora/push/PushHelper.java