Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* This call will:
- * - Check on SharedPreferences if a previous token has been saved
- * - Try to obtain the device token from FirebaseInstanceId
- * - Save the obtained token on SharedPreferences
- * - Initialize an MpnDevice object with the previous and current tokens
- */
- MpnDevice.create(context, senderId, new MpnDevice.MpnDeviceCreationListener() {
- @Override
- public void onSuccess(@Nonnull MpnDevice device) {
- // The MpnDevice object is initialized and ready for use
- }
- @Override
- public void onFailure(@Nonnull Exception e) {
- // Something went wrong
- }
- });
Add Comment
Please, Sign In to add comment