Unity – Get the max android volume with JNI without native plugin

In the previous post we learn how to get the current volume.

As I said the max volume can be different according the OS version or de device.

Now let’s get the max volume in c# without native plugin:

Unity – Get current android volume with JNI without native plugin

To get the current volume value on Android in Unity without plugin you can use this c# script.
Thanks to the Java Native Interface.

You will get an integer between 0 and ?, 15, 13, 25, …
NB: Actually the max volume value depends of the OS version.