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

Android openNotificationSettings opens Do Not Disturb #34

Closed
agersea opened this issue Jan 22, 2020 · 6 comments
Closed

Android openNotificationSettings opens Do Not Disturb #34

agersea opened this issue Jan 22, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@agersea
Copy link

agersea commented Jan 22, 2020

Android Emulator Pixel 3 XL

When calling AppSettings.openNotificationSettings the device navigates to Do Not Disturb settings.

Additionally, it interrupts the app history and does not allow for easy navigation back to the calling Flutter application

app_settings: ^3.0.0+1

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G2022, locale en-US)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.1)
[✓] Android Studio (version 3.5)
[✓] VS Code (version 1.39.2)
[✓] Connected device (1 available)

@spencerccf
Copy link
Owner

What version of Android OS are you running? I will setup Pixel 3 XL with that version and try to replicate what you are seeing. The navigation back to the calling Flutter application is standard Android navigation... use the system back button. iOS offers a back to app link in the upper left of the window but Android doesn't and expects the native built in back button to be used. There is no way to add a back button to that native Android screen that is being called from a separate application.

@CodeDruid13
Copy link

CodeDruid13 commented Jan 28, 2020

Happens also on my end. It opens do not disturb permission on Samsung J4 plus.

@Jan-pp
Copy link

Jan-pp commented Apr 21, 2020

Same issue on my Galaxy S6 with Android 7.0. It opens the DND page instead, but it does show the top-left back button which works fine.

However when I choose to open app settings it does not show the back button and the hardware back button doesn't work either.

@aqwert
Copy link

aqwert commented Apr 30, 2020

Looking at the code it uses ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS which is for Do not Disturb

Looking around the place it could use APP_NOTIFICATION_SETTINGS for Android 8 and above or ACTION_APPLICATION_DETAILS_SETTINGS

May need to checked and it could be dependant on the Android version.

@plinkos
Copy link
Collaborator

plinkos commented May 18, 2020

We will need to add a Android version check and swap out the setting accordingly. Anyone interested in taking this one on and creating a PR?

Sent with GitHawk

@spencerccf spencerccf added the enhancement New feature or request label May 26, 2020
rahul0101 added a commit to rahul0101/app_settings that referenced this issue Aug 13, 2020
Implemented solution in issue spencerccf#36 for issue spencerccf#34
@Ebsan
Copy link

Ebsan commented Aug 19, 2020

I'm still having issues with API version 24. The StackOverflow and documents show that APP_NOTIFICATION_SETTINGS cannot be relied on for versions prior to API 26. In

should be changed to >= 26 not 21.

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

No branches or pull requests

7 participants