Calling cordova plugin on mouted App
-
Hi fellows,
I am hit my head against the wall for many days, about integrating a cordova plugin and vue/quasar.I am using phonegap-push-plugin, on device ready I got the token and save it to local storage, once the use logs in, I would subscribe this user to a specific topic.
Regarding the push plugin, I am pretty comfortable, the problem is how do I call it inside vue/quasar.
This is how it is made on Index.html, an work fine:
push.subscribe(‘all’, function() {
alert(‘success’);
}, function(e) {
alert(‘error:’);
});Once the user is logged in, I would subscribe him to another topic:
push.subscribe(‘track-orders-12356’, function() {
alert(‘success’);
}, function(e) {
alert(‘error:’);
});Anybody did this sort of integration with any other plugin?
Many thanks in advance.