I am trying to download fit file into fenix 5 using makeWebRequest
function onReceive(responseCode, data) {
if (responseCode == 200) {
System.println("data loaded ok:"+data);
Background.exit(data);
} else {
System.println("data load failed:"+responseCode);
//Background.exit(null);
}
}
but the data which I got after makeWebRequest call, doesnt contain data at all. "data loaded ok:Obj: 37"
According debugger it seemed that it's only pointer to resource "data._data=Resource (0x28)"
I would like to use download fit file for navigation but how should I use data variable to force device to save fit file and show it in list of navigation files.