I have an interesting issue with TLocationSensor
. If the location is allowed in the Android menu before I start my application, the sensor works fine. I catch the event OnLocationChange
. But if I don't allow location in the Android menu and start the application and then allow location in the Android menu the sensor doesn't work.
Event OnLocationChange
is not called.
Set LocationSensor1.Active := true;
doesn't help in this case.
How can I automatically allow location after my application starts?
I am using Delphi XE10.1 Berlin
and Android 6.0