Skip to content

PushRegistrationService

Lejla Solak edited this page Sep 12, 2024 · 1 revision



updatePushRegistration(context, newToken)

Description

Update device token used for receiving push notifications from Infobip's SDK.

Arguments

  • context: Context - An instance of the android.content.Context class.
  • newToken: String - The new FCM token for the device.

Returns

  • N/A

Example

class FcmService extends FirebaseMessagingService {

    @Override
    public void onNewToken(String token) {
        // Forward the new FCM token to Infobip's SDK
        PushRegistrationService.updatePushRegistration(getApplicationContext(), token);
        // Additional handling of the token, if necessary
    }
}

Tutorials

Migration guides

Reference documentation

Clone this wiki locally