K
K
Kirill Petrov2016-01-14 17:21:21
JavaScript
Kirill Petrov, 2016-01-14 17:21:21

How to send received push message to localStorage in cordova or phonegap?

I want to deliver notifications to an application on the cordova framework. Connected plugin https://github.com/phonegap/phonegap-plugin-push notifications come.
But when the app is not active, javascript doesn't handle the new message acceptance event and put it into localStorage, where it should be read when the app is activated...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Skogorev, 2016-01-14
@EnterSandman

push.on('notification', function(data) {
   localStorage.mymessage = data.message;
});

not?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question