I trying to get the devices location, but the TomtomMap.getUsersLocation() is always returning null.
The wired thing is that since i set TomtomMap.setMyLocationEnabled(true) the map marks the user location correctly, but when i try to get it for my self it returns null.
I followed the documentation on how to do it, it was very simple to follow, it just does not work. I also checked the answer below, but it is just a copy of the docs.
It's hard to guess without looking at the code, but most probably you are trying to get user location too early when GPS position is not yet available (perhaps inside
onMapReady
callback).To make sure that you are getting the user location as quick as possible you can override the
onLocationChanged
callback.Please find an example activity code below: