public static void OpenSettingView(SettingViewAction action) { using (AndroidJavaClass androidJavaClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer")) { using (AndroidJavaObject androidJavaObject = new AndroidJavaObject("android.content.Intent", new object[0])) { androidJavaObject.Call <AndroidJavaObject>("setAction", new object[] { NpSettingAndroid.GetActionPackage(action) }); androidJavaClass.GetStatic <AndroidJavaObject>("currentActivity").Call("startActivity", new object[] { androidJavaObject }); } } }
private static string GetActionPackage(SettingViewAction action) { return(NpSettingAndroid.actionPackageArray[(int)action]); }
public static void OpenSettingView(SettingViewAction action) { NpSettingAndroid.OpenSettingView(action); }