Skip to content

PushRegistrationService

Lejla Solak edited this page Feb 10, 2025 · 2 revisions



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, which provides access to system services, resources, and application-specific data in an Android application.
  • 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