Location sensor work only in companion

Hi everyone, I’m new and I’m going crazy because I can’t go on even though I’ve read in many posts … I’ll explain my problem … I’m creating a Weather App, I get the values ​​from “WeatherAPI.com”, everything works, but only when I try it through the companion … if I compile the application it doesn’t detect anything, I also put some labels to see the result but they are zero while the location is wrong

please give me a hand … Thanks.


this is the screen when I run the Companion and it works fine

this is the screen after compiling the App and it doesn’t work … but why !!!

use the LocationChanged event rather than the Clock.Timer event
also you might want to remove the AskForPermission blocks… the necessary permissions should be asked automatically…
did you enable GPS?
are you testing your example app outside to get a good GPS signal?
it takes a few seconds until you get the first coordinates…

Taifun

Add this block when screen initialize,

Set location sensor enabled true

Tanks you !!! now function… woow :slight_smile:

1 Like

If your problem resolved pls mark the suggestion as solution…

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.