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, 
  • Answering my own question, it occurs to me that the fact I'm having to post this in a web request to see the output might mean it's converting it differently to how the println() statement would. I'm going to check that now...

    It sounds like you are passing the tiles array as a parameter to your web request? I've looked through your code and I'm not seeing where you are making the POST request you speak of, so I can't tell.

    There is a known discrepancy in the simulator where values in the parameters dictionary need to be explicitly converted to string on device where this is not necessary on the simulator. It sounds like you may have been running into this.

  • Thanks. I think it's in my 3rd or 4th reply, but can't seem to quote it and on my phone so don't have it to hand.

    I don't pass any parameters, but I will definitely double check everything I do pass and make sure I toString() it before I make any calls, because it does sound like this could be an issue 

  • Well, this hit me. A user with a vivoactive 4 reported the screen flashed. Upping the refresh to be consistent across the whole screen fixed this problem.

    I'm not sure why the simulator doesn't recreate this behaviour (or why different devices differ tbh). It's a pretty big divergence from the device to the simulator.