I am implementing a module which required user latitude and longitude to punch attendance offline.
I have implemented GPSTracker class followed this example on the LINK
But after enabling GPS location I am punching attendance then this class returns null location object. But after 30 to 60 sec It returns location object correctly.
I have also added COARSE
and FINE
permission in Manifest and get run time permission also.
So I need help how to get latitude and longitude instantly after enabling GPS location.