-
Notifications
You must be signed in to change notification settings - Fork 46
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
Detect volume button other way #44
Comments
Hi @nexussmart , In normal Android development(i.e. native Android), it is very easy to detect volume button events without requesting ACTION_MANAGER_OVERLAY_PERMISSION that we request here. You can just override onKeyDown method in your Activity. However, flutter plugin environment provides very limited api, and there was no easy way to implement volume detection except what we did in this plugin. So.. as far as it seems now, ACTION_MANAGER_OVERLAY_PERMISSION is necessary. Besides, the link you shared with us is only for Cordova, and its development environment is different from that of flutter plugin, so it couldn't be our option :( Thanks. |
Hi @giantsol, I override the mainactivity to detect event key Volume Up and Down : `
|
Yep, that's exactly what you can do if it's your own app. You just wrote your own EventChannel! |
Hi,
Is it possible to otherwise detect volume button events on Android so you do not have to ask for permissions?
[https://github.com/manueldeveloper/cordova-plugin-volume-buttons/blob/master/src/android/VolumeButtonsListener.java](Cf plugin ionic )
The text was updated successfully, but these errors were encountered: