Advertisement
uurha

Open Location Service

Jan 28th, 2022
931
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.44 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement