11-24-2017 06:28 - edited 11-24-2017 09:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2017 06:28 - edited 11-24-2017 09:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi all,
in my opinion after the latest update to OS 27.30.5.16 GPS functions crash again.
Does anybody observe problems with geolocation.getCurrentPosition(locationSuccess, locationError) again?
My Virtual Partner app - which I'm using since the update before - ran without any problems for half an hour. Now it crashes again. The Ionic resets without any message in the console log.
Capitano
11-27-2017 12:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-27-2017 12:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Can you provide a code sample? I assume you're doing this on the device?

11-27-2017 13:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-27-2017 13:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello @JonFitbit,
By now I'm not sure what's the reason for the error. Since the last OS update I get the "app message queue full " error, although my app was running without problems before the update.
Actually I check your hint at
https://community.fitbit.com/t5/SDK-Development/App-msg-queue-full/m-p/2313147#M1634
But to be honest - I don't understand the code fully by now.
Capitano

11-28-2017 08:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-28-2017 08:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello @JonFitbit,
Here's the core/frame of my application:
function getPosition() {
geolocation.getCurrentPosition(locationSuccess, locationError);
} // end function getPosition
function locationError(error) {
// message output
} // end function locationError
function locationSuccess(data) {
// var definitions
// Message output
// calculating distance that was run
} // end function locationSuccess
myFunction02 = setInterval(getPosition, 1000); // calling function every second
function updateDisplay() {
// reading heartrate sensor, doing some calculations and outputs
} //* end function updateDisplay
function startAction() {
// Begin monitoring the sensor
hrm.start();
// And update the display every second
myFunction01 = setInterval(updateDisplay, 1000);
} // end function startAction
Don't know if that helps or gives you an idea where the error could happen.
I'm just thinking about to start only one intervaltimer and to include the call of the getPosition function in the updateDisplay function.
Capitano

11-30-2017 09:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-30-2017 09:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
I have new findings:
geolocation.watchposition() seems to work - the app is running for several minutes - I still have it to test for a longer period.
Now I don't use geolocation.getposition() with setIntervall() anylonger. Should to be one of the reasons for the failure.
But for me it also seems that locationError(error) will not be entered.
Before the latest OS-update this function was entered as long no GPS connection was established and I could use it to show the missing connection in the display.
Now I can only see that locationSuccess(data) will be entered...
Should it work that way?

