I am trying to fetch Gps latitude and longitude, but i am having a query that whenever i try to fetch Lat & Long without sim card, it is not providing any info where as soon i insert my sim card, it provides me all information in desired manner.
LocationManager mlocManager =
(LocationManager) getSystemService(Context.LOCATION_SERVICE);
LocationListener mlocListener = new MyLocationListener();
mlocManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
0, 0, mlocListener);
you can see though i m using GPS_PROVIDER, it is not giving me Lat & Long without Network Operator help, can anybody tel me?
Another thing is How to start and stop GPS from an application means i wanna start gps after particular time and than as soon i get beslocation, i can turn it off.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…