react-native-notification-sounds
react-native-notification-sounds copied to clipboard
TypeError: null is not an object (evaluating '_reactNativeNotificationSounds.default.getNotifications')
I'm getting this error
TypeError: null is not an object (evaluating '_reactNativeNotificationSounds.default.getNotifications')
when i call NotificationSounds.getNotifications().
Hi @avinashsahoo , Could you please share your code where you are using the library? Remember it will not return any sounds on iOS Simulator.
the same with me - android device. lib ver 0.2.2. my code:
import NotificationSounds, { playSampleSound } from "react-native-notification-sounds";
and on componentDidMount
NotificationSounds.getNotifications().then(soundsList => { playSampleSound(soundsList[1]); });
Hi @avinashsahoo were you to solve this issue. I had same running on ios simulator and phone connected to metro I am using Xiaomi one.
I'm having this issue on android device. Same code on docs
Same issue!
Does it give the same error when you run the example repo? Here is the link to the repo: https://github.com/saadqbal/notificationSounds
same issue
Hope you are doing great! I'm also facing the same issue, I want to use custom sound on my local notification in the app. It would be great if you could help me in any sense.