Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
app
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Getting Started

make it.

$ ./gradlew assembleRelease
# ./unity_lib/build/outputs/aar/unity_lib-release.aar ← use it.

and use it.

add unity folder

/Assets/Plugins/Android/unity_lib-release.aar

Unity code

void Start() {
    AndroidJavaObject androidJavaObject = new AndroidJavaObject( "unity.util.bascule.co.jp.unity_lib.GetAndroidStatus" );
    int batteryLevel = androidJavaObject.CallStatic<int> ("BatteryLevel");
    int temperature = androidJavaObject.CallStatic<int> ("BatteryTemperature");
    Debug.Log ("batteryLevel: " + batteryLevel);
    Debug.Log ("temperature: " + temperature);
}

About

read temperature and battery level

Resources

Releases

No releases published

Packages

No packages published

Languages

You can’t perform that action at this time.