13 private AndroidJavaObject javaObject = null;
17 AndroidJavaClass javaUnityPlayer =
new AndroidJavaClass(
"com.unity3d.player.UnityPlayer");
18 AndroidJavaObject currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>(
"currentActivity");
20 AndroidJavaClass javaClass =
new AndroidJavaClass(
"com.maxst.ar.wearable.WearableDeviceController");
21 javaObject = javaClass.CallStatic<AndroidJavaObject>(
"createDeviceController", currentActivity);
23 currentActivity.Dispose();
24 javaUnityPlayer.Dispose();
30 if (javaObject != null)
37 public bool IsSupportedWearableDevice()
39 if (javaObject == null)
44 return javaObject.Call<
bool>(
"isSupportedWearableDevice");
47 public string GetModelName()
49 if (javaObject == null)
54 return javaObject.Call<
string>(
"getModelName");
57 public void SetStereoMode(
bool toggle)
59 if (javaObject == null)
64 javaObject.Call(
"setStereoMode", toggle);
67 public bool IsStereoEnabled()
69 if (javaObject == null)
74 return javaObject.Call<
bool>(
"isStereoEnabled");