2016년 12월 29일 목요일

Latitude and Longitude not working on device


I am not sure what is going on but Latitude and Longitude for the LocationSensor component are not working on my device. It works however on the emulator that I am using. I have tried 2 different devices and they are all not working. My location service on the device is turned on.

Here are the blocks:


Always returning zeros. I have tried leaving ProviderName out but still the same problem

Any idea on how to fix this?

--
make sure, GPS is enabled on the device
then in your blocks check the available providers: is gps available? if yes, then set the provider to gps and lock the provider
after that it takes a few seconds before you get the first values
and: to get a better GPS signal, go near the window of better go outside

-- 
you can use these blocks as test
Taifun
-- 
You are totally correct. The device takes time to load lat and long. It worked after I put a timer.

-- 

댓글 없음:

댓글 쓰기