Community Questions & Answers
GPS Navigation
Is it possible to create "Get Direction" option in Titanium to function in following way: 1. - User click on "Get Direction" button 2. - Intent dialog is opened, and user can choose if directions are calculated via google maps or iGo...
Geolocation not refreshing
SDK: 3.0.2 IOS: 6.1 I have a list that fetches locations from the server. Here's the flow: 1. Get Position (see function) 2. make call to the server with those coordinates (that the location callBack) 3. update list Now this works perfectly fine, until I...
Android: Getting GPS location on device
Hello. I can't get GPS location on Android (3.1) device that I use, a KitchenSink example does not work also. Here is error message: {"message":"location is currently unavailable.","code":2} I enabled GPS in...
URGENT: Location permission dismiss quickly before the user can accept or decline.
Hello, my app asks for location permissions to the user and it was working perfectly before doing some updates to the SDK and I'm just guessing that this is the issue because I didn't change the code that used to work. Now if the user installs for the...
"My App" would like to use your location dialog is hidden before user can interact with it
For some reason, when my iPhone application is first downloaded and the 'App would like to use your location' dialog appears, it is instantly hidden again. This means the user never has the opportunity to accept the GPS function and the app doesn't...
AR apps using GPS, Compass, Gyroscope, Accelerator and image as target image
Hi, Is it feasible to make an app with Appcelerator that use all of these GPS, Compass, Gyroscope, Accelerator and image as target image? thanks Regis
Android locationServicesEnabled always returns true
Hi all, I'm building an app for someone, and one of the requirements is that if GPS is disabled (i.e. from the swipe down top bar) then it would give them the option to turn on their GPS. The problem i'm having is that I cannot get whether or not this is...
Getting Cached Location instead of current location
Hi, Here is my code, i can't get current location , i m getting cached location: ~~~ Titanium.Geolocation.distanceFilter = 10; Ti.Geolocation.purpose = "Obtain User Location "; Titanium.Geolocation.accuracy =...
about locationServicesEnabled
On Android OS 2.2 and above, there is a new, "passive" location provider that is enabled at all times, even when the user disables both the GPS and Network location providers. Therefore, this method always returns true on these devices. then...
iOS Bad GPS Accuracy with Geolocation.addEventListener
I'm testing Titanium 1.6 with iOS 4 on a 3GS phone. I'm using Ti.Geolocation.addEventListener('location') to get updates about a phone's location. Sometimes after the handler is attached, I'll get good GPS accuracy, but most times it won't improve to...
Send GPS possition to server
Hello, I was wondering what would be the best way to send the GPS possition to the server. I think there are at least two diferent ways: 1.- By login the device and after that the device send its possition each 60 seconds or 10 meters. 2.- Without login,...
How to determine whether the user is moving or not?
Hey all... I'm new to using location services and trying to find a solid example of how to determine motion. More importantly, I'd like to know if the user is moving or not. Ideally when the app is active and also when in the background. I've tried a few...
Calculate distance between current location and fixed location
Hi guys, I'm building a mobile application for iOS and Android which displays various locations across a city. I'm trying to solve a problem which involves calculating the distance between the current location of the phone and the location your viewing....
Android: Enable location service programmatically
Hello peeps, I have searched over the internet and so far I only found the way to [enable location service programmatically](http://www.androidhive.info/wp-content/uploads/2012/07/android_launching_gps_settings.png) is by using...
Valid parameters for Ti.Geolocation.Android
We are developing a pedestrian GPS application in which the GPS updates should be fairly frequent and reliable. I can't seem to get the GeoLocation.Android calls to work as documented. If I include a location rule, my app gets an update infrequently -...
Reason for rejecting iPhone app by Apple - Any thoughts??
I am building an iPhone app using Titanium 3.0.2 GA platform. The app uses GPS coordinates (lat/long) continuously ( in the background) and sends notifications to users if a product is available in their app's wish list. I am capturing the GPS coords...
geolocation track at all times
Hi guys, After lurking the wiki, google and Q&A for this topic, i cant figure out whats true. I need to develop an app for iOS 5 and 6, that registers the user´s location each 10 min, even if the app is in background. No matter the device´s battery...
Getting gps position in kindlefire hd
i am working on the android app, which uses the gps to calculate the lat and long. the app is working fine on Android device but when in run it on **kindlefire HD**, it doesnt gets me the gps location? how can i make it work in kindle?
Force iOS to not use AGPS
Is there a way to force iOS devices to not use the AGPS but only the normal sattelite GPS with the Titanium.Geolocation method?
Invoking a iOS background service (best way)
Hi Guys. Just a quick one... Can anyone think of why invoking an iOS background service via the apps 'pause' event listener is more stable than just registering a background service via a method that is called when a button is clicked (for example)? It's...
Titanium.Geolocation.getCurrentPosition always same coordinates above
I work when I have the GPS on but when I turn it off whenever I get the coordinates above Uso el sdk 2.1.4 GA ~~~ Titanium.Geolocation.preferredProvider = Titanium.Geolocation.PROVIDER_GPS; Titanium.Geolocation.accuracy =...
GPS reverse geocoding current location
Hi. I have an app where i want to get current location and put it in a DB with reverse geocoding. It seems that the GPS function wont "bite" or something or maybe i remove the eventlistner to fast so it dont have time to get the position. I...
Only use the GPS to locate even if it is turned on WIFI
I have a problem, I'm creating an app where the heart is the GPS. I need the same coordinates if is also active wifi. I can only use the GPS without affecting the wifi? I use this code but when I turn on wifi the coordinate change. var gpsRule =...
I can check if the GPS is active ?
I want to know if it's on the GPS in my device. Titanium.Network.online works for internet, but for the GPS?
IOS get background gps Data and send to Server
Hi everybodey, i would like to create an app that collect the geolocation data and send it to a server. This app should do all this stuff during it is in the background. Can you give me a clear answer about the possibilities, for an IOS device, to do this...
Best way to update Tableview Rows when GPS location change is fired
I have a GPS application that builds a tableview with distance label from the then current GPS location. I have a separate routine that kicks off an event viewer and updates the map as the user drives. I need to be able to update the tableview rows as...
"Nearby places" functionality
In the ACS API documentation related to Places, I don't see "nearby places" request processing functionality based on current location GPS coordinates. For example, the database includes retail stores with GPS coordinates and I'm standing in...
How to detect gps disabled in android?
How to detect gps disabled in android?
Determ in code - if running in simulator?
Hi, Is it possible to "determ" if the device is running in a simulator or in a real phone by code? When coding for geolocation, it would have been nice to manually code my long and latitude positions..... Joakim
get current location of android device in a small space/distance
Hi, how to to get the position of device changes in a room(changes in centimeter or max 1 meter postion) using GPS Titanium.Geolocation.getCurrentPosition or if there is some other method to deal this issue?
Check to see if GPS is enabled
Hi, I'd like to check the device if it has it's GPS enabled, and if not a redirect to the settings to enable the GPS. The app can not continue without GPS. Can this be done in Titanium? I'm using Titanium SDK 3.0.0, developing for android 2.2+ and iOS.
[iOS] Asking for GPS activation after refusal
Hi there ! I'm having troubles finding a correct answer... I think the answer might just be something like "Yes because..." or "No because..."... The question is : Is there a way to ask again for GPS activation on iOS after user...
Mapview needs current users location on IOS
I have a mapview, but no intention to use the User's Current Location. Still when the Mapview is opened on IOS for the first time on a fresh installation, the iPhone prompts to allow for the current User's Location. I have set userLocation to...
Geolocation error codes issue TIMOB-2569 not fixed for android
"Add a 'code' property to success=false callback responses on geolocation, and expose the internal error codes." issue [TIMOB-2569](https://jira.appcelerator.org/browse/TIMOB-2569). This was fixed for iOS. Shouldn't this be done for android...
Android unable to get location - Even with every setting enabled
I currently have a situation where I'm unable to get the location of my android devices. I've run kitchenSink and straight up added this to my app.config ~~~ Ti.Geolocation.getCurrentPosition(function(e) { Ti.API.info('Android Current Position...
Webview GPS
How do I get webview to ask for permission to use my GPS? I want my local HTML file to activate my phones gps and locate me. But I can't seem to find out how. I think I need an event in my HTML file but im not sure Im running Titanium 3 and I am...
Webview won't get GPS location
I have a mobile app that loads a webpage inside a webview. The page (www.uwf.edu/maps/online) when viewed on a mobile device can ask your device for its gps location to put a pin on the map. When viewed through the webview in my application it does not...
Titanium app with GPS positioning dies on some Android devices
We have a location tracking app developed with Titanium SDK 3.0.0.GA for iPhone and Android. On some Android devices we have tested (Samsung Galaxy SIII (Android 4.1), HTC Sensation Z710e (Android 4.0.3) and LG E610 (Android 4.0.3)), the app almost always...
GPS positions not getting updated
### GPS location is showing cached value in Android. I am creating an application for land survey (for GIS department). I need to get the GPS data accurately throughout the application. The GPS is working fine, but there are instances when, it is found...
how to open settings in iOS ?
can I open the settings to show the Location Serveices is on or off? [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs:root=LOCATION_SERVICES"]]; this can work in Xcode, in TitaniumStudio, How to do it?
Cant find variable Ti - When webview loads url via hrefs
Its been a while developing in titanium and i have got quite used to firing from within webviews and listening it from app.js adn vice-versa.But this time,when i specify this particular url directly in properties when creating the Webview,all the...
Get distance with locationHandler Android
Hi. I have some problem to get the distance between 2 points with Android. All i get is 0.0001km. Pls check and see if you can see what is wrong. Full code here: http://lucyseven.com/gps.js Thanx in advance.
Native backButton eventlistener? possible?
I'd like to have an eventListener on backbutton of the iPhone. I know i can make a custom backbutton, but this is not native! Its the native backbutton i want, there should be a way of knowing when this button is pressed. As for the reason: When i press...
Get every gps update
Hi guys, Is it possible to make a function which gets every gps update and not one based on distance. I have tried using GetCurrentLocation with a 1 second timer. But that turns off the gps after every try and it doesnt get very good signal. Any ideas?
DistanceFilter Questions
Hi, In my app I'm noticing the location change happening more often than I was expecting. I have `Titanium.Geolocation.distanceFilter = 200;` in my code. A few questions: 1. Does distanceFilter work on Android? 2. What is the unit of measure for...
Android distance with GPS
Hi. I have this code for calculating daistance between 2 points with google distance matrix drive mode. It works great on iOS but i cant get it to work with Android. I just get "Distance 1m Km" ~~~ var velo = {}; velo.getLastWeek =...
How to check Whether gps is enable or not
how can we find whether gps is enable or not
Get current position Commonjs Android
Hi What would be the best way to obtain current gps position using the commonjs methods? I will need to check that we actually get a gps position (not an old cached position) Thanks Tom
GPS icon does not disappear after hitting the home button
Before being told that I need to remove any Geolocation listener which I have already tried, please check the following scenario: Tested on iPhone 4 with 5.1 Titanium SDK: 2.1.3 Mac 1. Create a new mobile app project. After project has been created open...
How to create a service that will send GPS coordinates in background both Android and iOS?
How to create a service that will send GPS coordinates in background both Android and iOS?