I\'ve got this code
lm = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); boolean isGPS = lm.isProviderEnabled (LocationManager.GPS_PROVI
Try this GPS Example code. Hope it should helpful for you.
GPS Location