Hello,
I want to get lat and long of my current location but I am not finding any solution can anyone please help…
Hello,
I want to get lat and long of my current location but I am not finding any solution can anyone please help…
You can get the Latitude and Longitdude with the “Map” component.
You can also use the following blocks with the “Location Sensor” component:
I tried using location sensor but not working
You must ask for permission to use the location first.
Needed permissions:
android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_MOCK_LOCATION
android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
Thanks can you please share aia if possible
Sure, give me a second
No permission required, if they enable location service, immediatly you can get it by using google map which is inbuild in the kodular app
Just use these two blocks to get lattitude and longitude
Thanks I will try this
I will try this also
getlocationwhenGPSon.aia (2.0 KB)
This aia will give geo value immediatly but user need to enable GPS on but no need to ask any permission
not correct what if user does not move then the event will also not fire i prefer you the best use location sensor component or use the extension by @juananton1991
Thanks for the aia
It works well even if you are ideal in position or moving .
I have tested and still working fine in my school attendance app.
this is not working values are coming as 0
You’ll have to wait a few seconds and refresh again as it says in the AIA
this worked thanks