GPS is not the only way to get the user’s location. It can be obtained by WI-FI or mobile network (antenna triangulation). However, its accuracy may be low for what you want.
The API to get the location, depending on the availability and requirements indicated, uses the most appropriate medium.
If you are using Fusedlocationproviderclient requirements are indicated via a Locationrequest object:
mLocationRequest = LocationRequest.create()
.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)
.setInterval(10 * 1000) // 10 seconds, in milliseconds
.setFastestInterval(1 * 1000); // 1 second, in milliseconds
The means or means to be used to obtain the location are chosen according to the Locationrequest set.
A Locationrequest with a PRIORITY_LOW_POWER priority may not use GPS if another source is available that guarantees the required accuracy - about 10 Km.
So there is nothing you can do. If the user does not allow the GPS to turn on the API can not use it.
However the location will still be obtainable by another available means (if any) but with less precision.
See these questions for more detail.
Note Whatever the means used the application will always need permission ACCESS_FINE_LOCATION
or ACCESS_COARSE_LOCATION
.