firemonkey location sensor status dont change

  

my app is showing the location long and lat and it is working well

but when i have to detect the location sensor status
like on , of , working , error,…
it have some problem

my idea was this code :

Case LocationSensor1.Sensor.State of
TSensorState.Added : label5.Text:=’2′;
TSensorState.Removed : label5.Text:=’3′;
TSensorState.Initializing : label5.Text:=’4′;
TSensorState.Ready : label5.Text:=’ready’;
TSensorState.NoData : label5.Text:=’6′;
TSensorState.AccessDenied : label5.Text:=’7′;
TSensorState.Error : label5.Text:=’8′;
else label5.Text:=’error’;
End;

but when i turn on or off the gps it is ready every time

how can i detect and show the gps sensor status ?

Comments are closed.