Guest User

Untitled

a guest
Jan 16th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. /* This call will:
  2. * - Check on SharedPreferences if a previous token has been saved
  3. * - Try to obtain the device token from FirebaseInstanceId
  4. * - Save the obtained token on SharedPreferences
  5. * - Initialize an MpnDevice object with the previous and current tokens
  6. */
  7. MpnDevice.create(context, senderId, new MpnDevice.MpnDeviceCreationListener() {
  8.  
  9. @Override
  10. public void onSuccess(@Nonnull MpnDevice device) {
  11.  
  12. // The MpnDevice object is initialized and ready for use
  13. }
  14.  
  15. @Override
  16. public void onFailure(@Nonnull Exception e) {
  17.  
  18. // Something went wrong
  19. }
  20. });
Add Comment
Please, Sign In to add comment