dpa99c / cordova-plugin-firebasex

Cordova plugin for Google Firebase
MIT License
571 stars 465 forks source link

Add channel name in documentation #557

Open LazzeZee opened 3 years ago

LazzeZee commented 3 years ago

When adding notification channel there should be a channel name to avoid IllegalArgumentException:

var channel  = {
    name: "my_channel_name,
    id: "my_channel_id",
    sound: "mysound",
    vibration: true,
    light: true,
    lightColor: parseInt("FF0000FF", 16).toString(),
    importance: 4,
    badge: true,
    visibility: 1
};

FirebasePlugin.createChannel(channel,
function(){
    console.log('Channel created: ' + channel.id);
},
function(error){
   console.log('Create channel error: ' + error);
});
evangunawan commented 3 years ago

This occurs to me too, waste some time to find it. It is right that the name is mandatory.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dpa99c commented 3 years ago

Reopening as stalebot incorrectly closed it

DioxideHydrogen commented 3 years ago

This happening with me too. I get the example on README and only modify the sound name. image image

DioxideHydrogen commented 3 years ago

So, come back here, i discover that for some reason that i dont know why, in emulator i can't create the channel, why when i runed the cordova project in my phone, the chanel was properly created. This must be a dependecy (idk) that by default is not installed in emulator.