Hey guys, I’m trying to disable the volume buttons. I’ve read that I need to create a java plugin that will override the KeyEvent for the volume buttons. I don’t understand how I take an override function in java into unity. I tried to put a snippet from Android - Volume Buttons used in my application - Stack Overflow into an eclipse project, and create a jar file. The documentation at: Unity - Manual: Create and use plug-ins in Android doesn’t make sense to me. I’d be grateful if someone could dumb it down or point me in the right direction.
You can use SetTotalVolume from Android Native Functions in your Update function. I don’t test it but maybe work.
Here is a blog I found when I search for disabling all the hardware buttons on Android device : How to Disable Hardware Keys on Android devices using Scalefusion? | Scalefusion Blog