Created
May 23, 2019 22:11
-
-
Save Ayyagaries/7cf8a68f85920787a4622d6c7f2ce3ea to your computer and use it in GitHub Desktop.
Location file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (OS_ANDROID) { | |
// Setup GPS | |
var providerGps = Ti.Geolocation.Android.createLocationProvider({ | |
name: Ti.Geolocation.PROVIDER_GPS, | |
minUpdateDistance: 0.0, | |
minUpdateTime: 0 | |
}); | |
Ti.Geolocation.Android.addLocationProvider(providerGps); | |
Ti.Geolocation.Android.manualMode = true; | |
Ti.Geolocation.Android.addEventListener('location', gpsUpdate); | |
// Setup Network | |
var providerNetwork = Ti.Geolocation.Android.createLocationProvider({ | |
name: Ti.Geolocation.PROVIDER_NETWORK, | |
minUpdateDistance: 0.0, | |
minUpdateTime: 0 | |
}); | |
Ti.Geolocation.Android.addLocationProvider(providerNetwork); | |
Ti.Geolocation.Android.manualMode = true; | |
Ti.Geolocation.Android.addEventListener('location', networkUpdate); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment