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

Not allowed to change Do Not Disturb state #48

Closed
azanli opened this issue Jul 29, 2018 · 4 comments
Closed

Not allowed to change Do Not Disturb state #48

azanli opened this issue Jul 29, 2018 · 4 comments

Comments

@azanli
Copy link

azanli commented Jul 29, 2018

Attempting to setVolume either to 0 or from 0 throws the following error:

Not allowed to change Do Not Disturb state`

Remote stack trace:
at
com.android.server.audio.AudioService.setStreamVolume(AudioService.java:1905)
at
com.android.server.audio.AudioService.setStreamVolume(AudioService.java:1847)
at
android.media.IAudioService$Stub.onTransaction(IAudioService.java:139)
at android.os.Binder.execTransact(Binder.java:731)

I have added this use-permission to my AndroidManifest as well as the library's to no avail:
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />

Environment:
OS: macOS Sierra 10.12.6
Node: 6.11.0
Yarn: 1.7.0
npm: 5.3.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ~0.55.2 => 0.55.4

@c19354837
Copy link
Owner

Thanks for your feedback!

Can you give me your phone info?

@azanli
Copy link
Author

azanli commented Jul 30, 2018

Google Pixel 2 XL
Android Version 9

It looks like there needs to be a permission request for notification activity? This didn't happen to me on my Samsung S6 Edge Plus running Android version 5.

@c19354837
Copy link
Owner

V 1.5.2 is available.

I cannot reproduced it in Android 7. While I find this.

Hope you can test this version and tell me the result 😊.

You still need declare the <uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" /> in AndroidManifest.xml

@komal1212
Copy link

how can i set Phone Ring and Call silent using React native on button click

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

3 participants