Open devjeff opened 4 years ago
What kind of setting do you mean? System setting or app setting? And which platform?
Hi, I mean the system settings or sometimes it's called "sound profile". On Android you can enable/disable sound and vibration separately via system settings or the corresponding buttons in the notification bar menu. The programmatic access is described in this stackoverflow question for instance.
So, in Android terms I would to retrieve the currently activated ringer mode. I think, there is a similar functionality in iOS, as described here from the users perspective.
But what happens now in case vibration is disabled? Does it still vibrate?
Yes, correct. It still vibrates. I think, the OS (at least Android) doesn't forbid that, as the vibration might indicate an important alarm notification. If you take a look at the [ringtone player plugin](https://pub.dev/packages/flutter_ringtone_player#-readme-tab-, it provides the 'asAlarm' flag for that purpose.
i have the opposite experience. vibration only works if it's enabled in sound settings. I wish i could bypass it. (pixel 6, android 13)
It would be really cool to check, whether the vibration is enabled by the user, so that one can respect the user settings and vibrate only if the vibration is enabled.