Open girishk55 opened 5 years ago
do you use Ionic Framework? Can you provide some code?
I use Cordova. Below is the source code -
window.FirebasePlugin.initFirebase()
if (device.platform == "iOS") {
window.FirebasePlugin.grantPermission();
}
window.FirebasePlugin.setBadgeNumber(0);
// Handle notifications through firebase
// Get the device token (id):
// Note that token will be null if it has not been established yet
window.FirebasePlugin.getToken(function (token) {
console.log('Device Token: ' + token);
}, function (error) {
console.error('Device Token Error: ' + error);
});
//This is the best way to get a valid token for the device as soon as the token is established
//Register notification callback:
window.FirebasePlugin.onNotificationOpen(function (notification) {
console.log('notification details: '+ JSON.stringify(notification));
},
function (error) {
console.error(error);
});
Describe the bug Uncaught TypeError: window.FirebasePlugin.initFirebase is not a function error on Android platform
Expected behavior It should initialise and give instance id.
Console Logs Uncaught TypeError: window.FirebasePlugin.initFirebase is not a function
Plugin Version latest 2.0.5. also tried 1.0.5.