Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to get built-in GPS data?

Hi all:

    I' m going to develop an app that need independent GPS data, but I have no idea how to do that. The app only upload the geolocation data successful when connected to phone.

 

   I have been known there are four GPS mode from previous topic:

  • Always use built in
  • Use the phone or built in
  • Always use the phone
  • Always use GLONASS which is an alternative satellite system.

Have any method and document?

 

Thank you for the answers and supports.

Best Answer
5 REPLIES 5

I guess you've found the documentation on https://dev.fitbit.com/build/guides/geolocation/

gps is taken from the watch if available and in the "app" section.

If not available (Ionic and versa 1, light and 2) it takes gps from the phone .

When in "companion" section, it takes gps from the phone.

I've never been in Russia. I quess fitbit only uses "GPS". In Europe I think fitbit also uses "GPS" an not "Galileo". 

Community Council MemberMario Dings | Rotterdam NL
Fitbit: Versa, Versa2, Sense. (Versa light) - Phone: Android. - Developer clockfaces.(Nederlands)
Best Answer
0 Votes

Correction:

https://www.euspa.europa.eu/european-space/eu-space-programme/what-gnss

 

Global Navigation Satellite System (GNSS) refers to a constellation of satellites providing signals from space that transmit positioning and timing data to GNSS receivers. The receivers then use this data to determine location.

By definition, GNSS provides global coverage. Examples of GNSS include Europe’s Galileo, the USA’s NAVSTAR Global Positioning System (GPS), Russia’s Global'naya Navigatsionnaya Sputnikovaya Sistema (GLONASS) and China’s BeiDou Navigation Satellite System.

Community Council MemberMario Dings | Rotterdam NL
Fitbit: Versa, Versa2, Sense. (Versa light) - Phone: Android. - Developer clockfaces.(Nederlands)
Best Answer
0 Votes

Dear Mario Dings:

    As you thought I use the method from above link and I have been try to put the method in both section, the 'app' section and 'companion' section. It only works in companion section. I also found the exercise app (Fitbit built-in app) also can't use independent gps. Still try to find out solution.

Best Answer
0 Votes

What device/fitbit are you using? Iḿ using a Versa2, witch has no GPS on board. So it has to use GPS from the phone. But I  write the code in the apps section.

How does it look like in fitbit Studio? Does it work there?

And I guess: independent means using Versa3 or Sense and having no phone. (And it can take a long time/minutes before it has a fix.)

import { geolocation } from "geolocation";

function locatie(){
geolocation.getCurrentPosition(locationSuccess, locationError, Options) ;
}

function locationSuccess(position) {
tijd1 = position.timestamp;
Lat1 = position.coords.latitude;
Lon1 = position.coords.longitude;

...  etc....

Community Council MemberMario Dings | Rotterdam NL
Fitbit: Versa, Versa2, Sense. (Versa light) - Phone: Android. - Developer clockfaces.(Nederlands)
Best Answer
0 Votes

Dear Mario Dings:

    I use sense, so I pretty sure it has independent GPS. Why my app only works in companion section when upload GPS data because the below issue: https://community.fitbit.com/t5/SDK-Development/Unhandled-Error-failed-to-pre-parse-snapshot/td-p/29...

   Anyway, it works fine in companion section but only when connect to phone. 

    

Best Answer