Dim Obj1 As Reflector, GPSon As Boolean
Dim gps1 As GPS ' needed for ACCESS_FINE_LOCATION permission
Obj1.Target = Obj1.GetContext
Obj1.Target = Obj1.RunMethod2("getSystemService", "location", "java.lang.String")
GPSon = Obj1.RunMethod2("isProviderEnabled", "gps", "java.lang.String")
Msgbox(GPSon, "GPS enabled?")