Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
avinashsahoo opened this issue Jan 30, 2020 · 8 comments

Comments

@avinashsahoo
Copy link

I'm getting this error

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

when i call NotificationSounds.getNotifications().

@saadqbal
Copy link
Owner

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

@mijastrzebski
Copy link

mijastrzebski commented Apr 1, 2020

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

@jonra1993
Copy link

jonra1993 commented Sep 9, 2020

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.

@HeikelV
Copy link

HeikelV commented Oct 19, 2020

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

@LaurenceM10
Copy link

Same issue!

@saadqbal
Copy link
Owner

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

@landonwjohnson
Copy link

same issue

@motasimmakki
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants