react-native-notification-sounds icon indicating copy to clipboard operation
react-native-notification-sounds copied to clipboard

TypeError: null is not an object (evaluating '_reactNativeNotificationSounds.default.getNotifications')

Open avinashsahoo opened this issue 4 years ago • 8 comments

I'm getting this error

TypeError: null is not an object (evaluating '_reactNativeNotificationSounds.default.getNotifications')

when i call NotificationSounds.getNotifications().

avinashsahoo avatar Jan 30 '20 19:01 avinashsahoo

Hi @avinashsahoo , Could you please share your code where you are using the library? Remember it will not return any sounds on iOS Simulator.

saadqbal avatar Mar 11 '20 07:03 saadqbal

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]); });

mijastrzebski avatar Apr 01 '20 10:04 mijastrzebski

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.

jonra1993 avatar Sep 09 '20 03:09 jonra1993

I'm having this issue on android device. Same code on docs

HeikelV avatar Oct 19 '20 20:10 HeikelV

Same issue!

LaurenceM10 avatar Dec 22 '20 19:12 LaurenceM10

Does it give the same error when you run the example repo? Here is the link to the repo: https://github.com/saadqbal/notificationSounds

saadqbal avatar Dec 29 '20 09:12 saadqbal

same issue

landonwjohnson avatar Oct 12 '21 21:10 landonwjohnson

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.

motasimmakki avatar Dec 11 '22 19:12 motasimmakki