Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70429

Not Receiving Android Notifications

$
0
0

@ionicnewbie123 wrote:

Hi All,

I am trying to send notifications to my android device (Galaxy S3), using ionic.
This is my code.

    $ionicAppProvider.identify({
        app_id: 'xx',
        api_key: 'xx',
        gcm_id: '10289xx'
    });
        var push = new Ionic.Push({
            "onNotification": function (notification) {
                var payload = notification.payload;
                console.log(notification, payload);
            },
            "onRegister": function (data) {
                console.log(data.token);
            },

        });
        var callback = function (pushToken) {
            console.log(pushToken.token);
        }

        push.register(callback);

When i run the app on device and send a notification from the ionic.io push screen, the "onNotification"
is getting triggered and i am receiving the payload. But the phone doesn't show any notifications on its notification screen, Do i need to do anything special to make the notifications show on my phone ?

I have also executed the following commands
ionic push --google-api-key XXX
ionic config set gcm_key XXX

Ionic version : 1.7.8
Cordova Version: 5.4.0

Thanks !

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70429

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>