Hello,
I'm developing watchface with sunrise/sunset function, and i have problem when trying to get latitude and longitude
Hire is my code:
var positionInfo = Activity.getActivityInfo().currentLocation;
if(positionInfo != null){
var latitude= positionInfo.toDegrees()[0];
var longitude = positionInfo.toDegrees()[1];
}
I never get data because positionInfo is always null, when app running on simulator and on real device also.
Second think is, when i get data, I need to store somewhere, to have last knew position, which will be used when position is unavailable.
I will be grateful if You can help in this topic, or redirect me to some examples, or post.
BR
Piotr