Access to LocationManager in Android


I want to know if GPS Service is available in the device, but


return false also when GPS is on, but the user not confirm access to location services for this app.
So I try to do it in android native, and I want to write this code -

final LocationManager manager = (LocationManager) getSystemService( Context.LOCATION_SERVICE );
if ( !manager.isProviderEnabled( LocationManager.GPS_PROVIDER ) ) {
// gps not available

But I don’t know how to do it in typescript. Any help?


Check it here, exactly what you might need


@manojdcoder, You help me very much.
Thank you!