ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.04k stars 999 forks source link

bug: Visibility, lights and vibration props not working #5061

Closed azzamasghar1 closed 3 years ago

azzamasghar1 commented 3 years ago

Bug Report

Capacitor Version

@capacitor/ios not installed
  @capacitor/cli 2.5.0
  @capacitor/core 2.5.0
  @capacitor/android 2.5.0
  @capacitor/electron not installed

Platform(s)

Android

Current Behavior

Create a Notification Channel using the below code:

const notificationChannel: NotificationChannel = {
    id: "main",
    name: "Main Notifications",
    description: "Main Notifications Channel",
    importance: 5,
    visibility: 1,
    lights: true,
    vibration: true,
};
await LocalNotifications.createChannel(notificationChannel);

const channelList = await LocalNotifications.listChannels();
console.log(channelList);

In the logs we can see that although value of importance has been override but value of either one of visibility, lights and vibration are not and contains their default values. And of course due to visibility notification is not shown on Lock Screen.

image

Expected Behavior

Value of visibility should be changed to the passed value and notification should be shown on the Lock Screen.

Other Technical Details

6.13.4 output:

v10.19.0 output:

Additional Context

I tried debugging it in NotificationChannelManager and it seems that values are being updated correctly in their.

image

Ionitron commented 3 years ago

This issue may need more information before it can be addressed. In particular, it will need a reliable Code Reproduction that demonstrates the issue.

Please see the Contributing Guide for how to create a Code Reproduction.

Thanks! Ionitron 💙

Ionitron commented 3 years ago

It looks like this issue didn't get the information it needed, so I'll close it for now. If I made a mistake, sorry! I am just a bot.

Have a great day! Ionitron 💙

ionitron-bot[bot] commented 1 year ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.