Answer the question
In order to leave comments, you need to log in
Is it possible to determine if GPS is enabled on a smartphone from a mobile browser?
Is it possible to determine if GPS is enabled on a smartphone using js from a mobile browser?
Thank you in advance :)
Answer the question
In order to leave comments, you need to log in
I have not seen a direct API that provides such functionality.
I use this trick. The navigator.geolocation.getCurrentPosition() method takes an error handler as the second parameter. If any error other than PERMISSION_DENIED got into the handler, then I inform the user that geolocation is not available, please check if the geolocation module is enabled.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question