I've got a strange thing about LocationSensor in Hong Kong.
Sometimes, even when I enabled the location sensor and allowed the permission to track my location, the latitude and the longitude all returns 0 in Hong Kong. It will take a few minutes (5 ~ 10) if I want to change that number back to normal. I know that when LocationSensor returns 0, it means that no co-ordinates are available, I just want to know why.
The code is the same.
when Screen1.Intialize, set LatitudeLabel.Text to LocationSensor1.Latitude, set LongitudeLabel.Text to LocationSensor1.Longitude
when LocationSensor1.LocationChanged, set LatitudeLabel.Text to get latitude, set LongitudeLabel.Text to get longitude.
The same thing applies to LocationSensor1.CurrentAddress, when it returns No address available. It also happens in Kodular. I'm wondering if there is a bug in the system.
Google is accessible in parts of China, i.e., Taiwan, Hong Kong, Macau, small parts of Shanghai, so the problem is definitely not about Google or others blocked.
your Blocks might not be optimal. Have you tried the two aia's that are part of Using the Location Sensor ? Do you get the same results?
The tutorial probably answers your question. The initial satellite fix might take 30 to 60 seconds or more to produce coordinates. Hong Kong is a canyon of buildings. The buildings may Block line-of-sight between the required satellites and your Android at some locations within the highly populated city/region. To elicit an LocationChanged event, the gps receiver needs to 'see' at least three satellites. Depending on where you are at, that might take a while. Are you testing in an apartment? Then go outside, perhaps to a city park, you might have a better result.
Why No adddress available displays instead of a street address is discussed in this tutorial HOW TO: Parse a LocationSensor's Current Address by SteveJG . Simply. a user may receive that message if no address can be resolved using the current gps coordinates in Google's database. The CurrentAddress must be in Google's database. If the database does not have an 'address' associated with the current coordinates you get the default message.
The message appears to users when they are in the middle of farm land where there are no addresses; in large cities for some locations where addresses are ill defined and if Google is Blocked from receiving that information and for other reasons.
It may also depend on where you are in Hong Kong. Tall buildings can often block GPS reception, so if you're at street level in HK proper versus Lantau you will get different experiences.