It seems like the code is not running.
It is under $ionicPlatform.ready(function() {
FCMPlugin.getToken(
function(token){
console.log(token);
alert('token: ’ + token);
},
function(err){
alert('error retrieving token: ’ + err);
}
)
}
As said, when I do a Ionic Run Android, it is working