ForgeRock SDKs

Register for push notifications

To obtain the settings for handling push notifications, register the application with AM.

When you access the push authentication tree you created earlier, you are asked to register the device by scanning a QR code:

Registering an identity in Android

You must implement a QR code scanning mechanism in your app. You can find an example in the sample authenticator application provided in the forgerock-android-sdk repository.

After your scan the QR code and obtain the URI, register the push mechanism by implementing the FRAClient.createMechanismFromUri() method. The FRAListener can be used to receive the newly created mechanism:

fraClient.createMechanismFromUri("qrcode_scan_result", new FRAListener<Mechanism>() {

    @Override
    public void onSuccess(Mechanism mechanism) {
        // called when device enrollment was successful.
    }

    @Override
    public void onFailure(final MechanismCreationException e) {
        // called when device enrollment has failed.
    }
});
Copyright © 2010-2022 ForgeRock, all rights reserved.