0

I try to use phonegap-plugin-push 2.x. Registration event fires correctly in browser and in PhoneGap Developer app but nothing happens in application obtained from build.phonegap.com. Init is pastedet in deviceready part of code. I'll appreciate any suggestions.

<!--Initializing Push Notification-->

const push = PushNotification.init({
    android: {
        senderID: "12345....."  // the same without this line
    },
    browser: {
        pushServiceURL: 'http://push.api.phonegap.com/v1/push'
    },
    ios: {
        alert: "true",
        badge: true,
        sound: 'false'
    },
    windows: {}
});            

push.on('registration', function(data) {
    obj.regid = data.registrationId;
    alert(data.registrationId);   // no alert in built app
});
Antti29
  • 2,953
  • 12
  • 34
  • 36
wloges
  • 1
  • 1

1 Answers1

0

Have you included google-services.json, as required by version 2+ of the push plugin?

wildabeast
  • 1,723
  • 3
  • 18
  • 31