I have an app that is really nothing more than using the LocationSensor. In the LocationChanged event I fill text boxes with the latitude, longitude, altitude, and speed. I also fill a text box with the LocationSensor.CurrantAddress.
On my main development phone, a OnePlus 7T running Android 11, my software worked as expected for about the first dozen times – it correctly showed the Current Address. But after that first dozen times times it now only shows "No Address Available".
I loaded the same software onto a second phone, a Google Pixel 3a running Android 11, and while I am sitting in the same location my app now shows the Current Address. The latitude, longitude, and altitude look to be the same between the two phones.
I go back to my main phone and again, at the same location, it shows "No Address Available".
Is getting the CurrentAddress limited to a couple dozen times per month per device or something like that?
Is it correct to get the CurrentAddress from within the LocationChanged event? Or should I somehow delay reading the current address?
This is due to the LocationSensor reporting a slightly different set of coordinates. Read about Accuracy in * Using the Location Sensor . So why is it not providing an address? Read Using the Location Sensor. The gps is not as precise as you think it is.
No, whether you get a Street address depends on whether Google has the coordinates reported in the data base. It is not request limited.
If you want to know the CurrentAddress of your present location, yes of course.
Only if you want to know where you have been.
Read this material if you haven't already Barry (and consider doing the tutorial experiments) and you will have a good understanding on why you get the results you see.
Perhaps you live downtown in a fairly large city where housing/apartments are dense or in an building that obscures your view of the positional satellites. Either circumstance will give you a good chance of No address available.
If you go outside, you can probably get an address.
This could happen if the latitude and longitude reported are exactly the same and the device thinks it does not have an address match with those specific coordinates. Walk outside, see what happens.
However, the good news: you will ALWAYS get your latitude and longitude.
A footnote: Your device gets the CurrentAddress from Google's Cloud. The default CurrentAddress is No Address Available. If your device does not have a WIFI or data(network) connection, you will probably see No Address Available.