Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229594

Generate FCM Token in ionic 1

$
0
0

Hey I followed steps what you suggested me...Thanks for it but when I keep your code in my code that time it is not working...check my code it is right or wrong

$ionicPlatform.ready(function () {
$scope.$apply(function () {

        if (window.FirebasePlugin) {
            var Token
            window.FirebasePlugin.grantPermission(); //in ios
            window.FirebasePlugin.getToken(function (token) {

                Token = token;
                console.log(token);
            }, function (error) {

            });

            window.FirebasePlugin.onTokenRefresh(function (token) {

                Token = token;
                console.log(token);


            }, function (error) {

            });
            alert(token);
        }

    }

Viewing all articles
Browse latest Browse all 229594

Trending Articles



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