Advertisement
uurha

Open Location Service

Jan 28th, 2022
622
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using (var unityClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
  2.         using (AndroidJavaObject currentActivityObject =
  3.             unityClass.GetStatic<AndroidJavaObject>("currentActivity"))
  4.         using (var intentObject = new AndroidJavaObject(
  5.             "android.content.Intent", "android.settings.LOCATION_SOURCE_SETTINGS"))
  6.         {
  7.             currentActivityObject.Call("startActivity", intentObject);
  8.         }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement