The Geolocation API requires a Google API Key
It uses cell tower and WIFI nodes to produce location coordinates. As a result it is not as precise as using GPS.
App Inventor has no built-in control to access the API I imagine access would be using cURL which I do not know how it would be implemented in AI2.
I haven't tried using the Geolocation API but do not believe one can do it with App Inventor. Someone else might have a different opinion.
Inside of a building using the LocationSensor, you depend on WIFI or network because you probably will have no or a weak GPS radio signal. I think you could force the Provider to passive using the LocationSensor. If you use a cell phone, you should also have be able to set the Provider to network. Try that and you might get some kind of response indoors.
Wireless Networks use triangulation to determine the location of a device. The location information is obtained more rapidly than the data obtained from a GPS fix . A GPS fix can take from a few seconds under a clear sky to a30 or 40 seconds with a modern GPS reciever. A network fix is very fast. However the data provided by Wireless Networks is less reliable than most GPS fix's. Ordinarily network geo-location is not as precise as the information provided by a GPS. Mobile phones get the cell tower IDs from the nearest three or four cell towers in the vicinity. The technology uses the time difference of arrival to get your “exact” location within 10-50 meters of accuracy with 10-15 seconds. This method is called MS-Assist for GSM phones. A fall back method is called Cell ID. Cell ID is a passive guess of about 1.7 to 8 km (1-5 miles ) in accuracy and is possibly used if MS-Assist doesn't report sufficient certainty to get a position fix less than 100 meters (the minimum performance threshold for MS-Assist).
Faster
perhaps but less precise
Accuracy is imprecise compared to GPS.
Regards,
Steve