How to Determine if Android Device has GPS Support

public static final String FEATURE_LOCATION_GPS was added in API level 8
Feature for getSystemAvailableFeatures() and hasSystemFeature(String).
The device has a Global Positioning System receiver and can report precise location.
Constant Value: "android.hardware.location.gps"

1. Get a PackageManager Instance and save to myPackageManager.

2. Create a Boolean Variable named bolGPSSupported

3. Set the Minimum and Target SDK version  to or greater. 

4. In the onCreate method, add the below code. This will return the GPS ability to a boolean named bolGPSSupported. It will then display a toast displaying the GPS ability on the device to the user.

bolGPSSupported = myPackageManager.hasSystemFeature(PackageManager.FEATURE_LOCATION_GPS);
if (bolGPSSupported) {
Toast.makeText(this, "Device has GPS feature", Toast.LENGTH_LONG).show();
} else {
Toast.makeText(this, "No GPS feature!", Toast.LENGTH_LONG).show();

5. Compile and run!