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

Detecting sound in background #4

Open
lightwolfz opened this issue Apr 20, 2019 · 6 comments
Open

Detecting sound in background #4

lightwolfz opened this issue Apr 20, 2019 · 6 comments

Comments

@lightwolfz
Copy link

Is it possible to detect sound level when app is on the background or when screen is locked?
I tried to use the library with react-native-background-timer it work but only after a minute it's only
return rawValue: 0, value: -160 is there anyway to solve this?

@punarinta
Copy link
Owner

I haven't ever tested tested this, to be frank. What platform did you try it on? I'm not a guru of iOS, but on Android I don't think there are any hinders for background audio signal acquisition.

@lightwolfz
Copy link
Author

I used it on Android it was fine when testing with the emulator but not seems to work on my device.

@lightwolfz
Copy link
Author

Any ideas?

@punarinta
Copy link
Owner

@lightwolfz no ideas, sorry man. What I thought could be the reason is that react-native-background-timer fires only in a specific moment of time and during the rest of the period no data is collected. And measurements are averaged over a period of time. However this doesn't explain why does it still work in the emulator.

@punarinta
Copy link
Owner

If you have any clues please write them here. I'd be very thankful.

@lightwolfz
Copy link
Author

I'll keep working on it. I'll post the solution here if I have more information. Thanks for your support 😄

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

2 participants