Save the device token into localstoarge

Comments

1 comment

  • Avatar
    Alexander Belyaev

    Hello !

    Actually, you need to create your own method that will grab a token from local storage and save it in your database. Because Pushwoosh SDK doesn't have such functionality. Below you can find a basic sample of interaction with getPushToken and local storage:

    PushNotification.getPushToken(function(token) 
    {
    $localstorage.set('pushwooshToken', token);
    sendTokenToYourServer(); //you should grab a token from local storage in this method
    }
    

    Please let me know if you require any further assistance here!

    Regards, Alex.

Please sign in to leave a comment.