Tombaugh
Tombaugh

Reputation: 118

Android HTML5 geolocation doesn't show GPS icon

I'm writing an Phonegap app which uses HTML5 geolocation. At first I thought the GPS was somehow never triggered, because the GPS icon did not appear in the notification bar. However, the tool at https://github.com/andygup/html5-geolocation-demo gives me excellent accuracy (a few meters so definitely GPS), also without the icon being displayed. Is there any way to have the icon displayed when a Phonegap app (or browser app in general) uses the GPS?

I'm using Android 4.4.2 on a Nexus 4, with high accuracy location enabled.

Thanks!

Upvotes: 2

Views: 642

Answers (1)

klaudyuxxx
klaudyuxxx

Reputation: 374

I just found out why. It seems you have to set enableHighAccuracy option to true, if you want faster and more accurate GPS updates. Be aware it will use more battery too. The status bar GPS icon will appear too!

navigator.geolocation.watchPosition(liveGpsFct, liveGpsFailFct, {enableHighAccuracy: true});

Upvotes: 1

Related Questions