App misbehaving on ForeRunner 935. Fine on simulator

Hi,

I have a watch app which works fine on a couple of watches, but on a 935 it misbehaves.  It's mean to draw lines on the screen, which are downloaded as a json file. This constitutes a map.

It works in the simulator, but on the watch the screen is blank and having got some debug logs off the watch itself, I get a strange output and hoped someone might be able to shed some light.

Each json file has an ID which is a string. This string is number/number/number (eg. 32754/25849/17) respresenting a map tile location

I print the current tiles which are being displayed. The code to populate the tile ids is:

var tiles = new [totalTilesX * totalTilesY];

var x = topLeftTileX;
var i = 0;
while(x <= bottomRightTileX){
var y = topLeftTileY;
while(y <= bottomRightTileY){
tiles[i]= x + "/" + y + "/" + z;
i++;
y++;
}
x++;
}

return tiles;

Then, later on, the code to print the ids

System.println(tiles);

On the 935 Simulator, and on my watch (vivoactive) and a fenix it prints the strings when I print the array.

[32739/25972/17, 32739/25973/17, 32739/25974/17, 32740/25972/17, 32740/25973/17, 32740/25974/17]

On the watch where it doesn't work, when I print the array of values, it prints

[f.a.q.b.l@92a741b2, f.a.q.b.l@92a7b611, f.a.q.b.l@92b1b63b, f.a.q.b.l@86f0b2d1, f.a.q.b.l@86f12730, f.a.q.b.l@86fb275a, f.a.q.b.l@7b3a23f0, f.a.q.b.l@7b3a984f, 
  • To quote something you have to highlight it, and click on the "Quote" popup that appears.

    got it. 

  • There are difference in the sim on what you may see, and it's often how you specify the URL, parameters and options  A phone with iOS can be a bit more picky.  Sometimes it was adding params as part of the URL instead of in params.

    This is interesting. Are you saying the behaviour depends on the device the watch is connected to? I hadn't considered that, if that's the case.

  • Oh lol I found an hour long video on Fenix 6 Pro navigation.

    Here's a link to the part of the video where he shows opening the pan/zoom menu (don't bother watching for more than 20 seconds at this point, as he's not going to show panning here, just zooming out.

    https://youtu.be/vUtBtPPAlMs?t=1111

    Another link to where he demonstrates panning:

    [https://youtu.be/vUtBtPPAlMs?t=1355]

  • Yes, there can be differences if the phone is Anroid or iOS. How parameters are done is a biggy if I recall, but all works if you use params for all, your params and not tack any on to the url..

  • Oh lol I found an hour long video on Fenix 6 Pro navigation.

    Here's a link to the part of the video where he shows opening the pan/zoom menu (don't bother watching for more than 20 seconds at this point, as he's not going to show panning here, just zooming out.

    https://youtu.be/vUtBtPPAlMs?t=1111

    Another link to where he demonstrates panning:

    [https://youtu.be/vUtBtPPAlMs?t=1355]

    That's some camera skills. I can barely video my watch screen through the reflections (I tried).

    If you get a chance to try to try the latest version I suspect it might remove that error as I think the blank API key would have been the problem. I need to get some sleep. Thanks again.

  • I got a map with the latest version!

    The map screen did freeze while the maps were loading (although I was able to start/pause the activity and change screens).

    Maybe you want to display some sort of animation/popup so the user knows something is happening? (Especially when response to input may be sluggish at this point.) If you're okay with blocking the entire UI (in case it should be blocked anyway), you could use a WatchUi.ProgressBar

    Do you need debug logs for this one?

  • Yes, there can be differences if the phone is Anroid or iOS. How parameters are done one a biggy if I recall, but all works if you use params for al, your params and not tack them on to the url..

    I seem to be using the params everywhere, but I guess treatment of headers is slightly different as well. I was setting it to null because I just removed all the security for testing (and I did a sloppy job)

  • In general, what this kind of sounds like to me is that your app seems to think you have good data from a webRequest if the call back has been called.

    This is something you won't see in the sim unless you do something like set the BLE connection off in Connection Types in the sim, but can easily happen on a device.

  • Awesome! that's excellent news since this has been driving me nuts. I suspect it was the initial API key that was the problem. I've had one in my watch since forever, but perhaps cold-booting it without one causes some bad state which it can't get out of.

    I'll try to recreate it locally by starting from scratch and clearing the storage.  Appreciate the keen eyes taking a look and feel free to provide any more feedback. I'll leave the API key validation off while I fix up some of the suggestions you made in case you wanted to play around some more. You should be able to move around and get a map realtime that rotates and moves with you.

    If I'm desperate I might ask for another test, but I hope I can spare you the trouble.

    Re the map loading. It loads tiles as required, so the maps will load gradually at first startup. Once that's done it should load them offscreen so you mostly won't notice it (unless you're moving super quickly).

    The memory limitations are a killer. I had to compress the data down to a simple array (turns out 1d array is much, much smaller than 2d coordinates) and chop the map into pretty small tiles for the web requests to succeed, and simplify it etc.etc to get it to fit.

    Even then, if a section of the map is too busy I have to start chopping out features and eventually reduce the viewport to a section of the screen.

  • Do you need debug logs for this one?

    I probably don't need the logs. I guess it just works!