Why did you place the HasLongitudeLatitude block in a Timer?
On iPhone 12, HasLongitudeLatitude returns false when I put it under the Screen1.Initialize event. But returns true when I put it under the Clock1.Timer event, which is constantly updating every one second, so HasLongitudeLatitude takes time to update. By the way, I did have Location Sensor's TimeInterval set to 1 second instead of the default 60 seconds.
What makes you think the LocationSensor isn't working?
Because the point of using LocationSensor is getting location information like Latitude, Longitude, CurrentAddress, etc. So if HasLongitudeLatitude returns false, that means I can't use the properties like Latitude, Longitude. I did explicit test by using Latitude and Longitude property and as expected, it returns 0 but I don't live on the equator. So it means no value is available. Also I did allow Location Access permission for App Inventor by clicking on the "Allow only while using the app". I didn't have "Allow all the time option". So that was the highest privilege I can give.
Have you read and tried the two aia's at Using the Location Sensor ?
Yes. But I'm puzzled.
The resource says:
HasLongitudeLatitude
If true, Android device can report longitude and latitude.
This is reported as a Boolean value; i.e. true or false (use the Logic blocks). Another way to look at this is does this device support a GPS. All it does is query the device to establish if a device has this capability when used in an if then block.
I mean I'm pretty sure S9+ has gps functionality but still returns false like it doesn't. I did run Google Maps on S9+ just to make sure if the internal gps hardware isn't broken, and it does work.
Also, I tried Location Sensor Test under Downloads section.
When I run the app nothing is showing up.
The LocationSensor is NOT working as intended yet on ios. Allow MIT time to fix the issue.
In the meanwhile borrow an Android and experiment with the tool there. Some properties with ios evidently return nonsense information.
Try setting it to 20000 ms on an Android. and wait for the gps receiver to get a satellite fix (and allowing it to know where the cell phone is at) . If you read the MIT recommendations, you should be using about 20000 ms, get it working then experiment with faster settings.
The behavior of getting latitude and longitude = to 0 (0,0 coordinates) is the LocationSensor default, a point in the Atlantic Ocean West of Africa. It means your LocationChanged event is not firing.
Where are you testing? Try your app outside.
Home. But it's not like I'm trying my app in a concrete bunker.
Google Maps and TIMAI2's HTML5 GeoLocation works fine.
So I'm not sure what difference this makes.