Don't ask, or "battery consumption" ;)
var position = Activity.getActivityInfo().currentLocation;
Does it have a solution? I have an exact same problem with this code....
location = activityInfo.currentLocation; if (location) { location = activityInfo.currentLocation.toRadians(); app.Storage.setValue("location", location); } else { location = app.Storage.getValue("location"); }
Understand that when to put stuff in Storage with setValue, it must be of an allowed data type. When I save a location in Storage I save it as lat/lon as floats.
You are trying to save an array of doubles, which I think should work per the doc. Do you get any kind of an error? It could be an error in the doc.
From the API Doc:
Keys can be of the following types:
Values can be of the following types:
BitmapResource (Since 3.0.0)
AnimationResource (Since 3.0.8)
ScanResult (Since 3.2.0)
null
It means, if understand correctly that the object location cannot be safe "as is" and should be divided into two variables like lat and long and then when I store these vars into Storage it should work?
Anyway thanks a lot for the reaction!