12:01 PM 12:01 PM12:01 PM

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:

11:47 AM 11:47 AM11:47 AM

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.

10:36 AM 10:36 AM10:36 AM

Sometimes you need to check the Wifi connection of the device on mobile for several reasons.

In order to get the permission to get the Wifi state you have to add this permission in the AndroidManifest.xml file:

Then use this code in your c# class: