OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

@capacitor/geolocation v5: is is possible to show the native dialog box to ask the user to turn on the GPS?

  • Thread starter Thread starter lucataglia
  • Start date Start date
L

lucataglia

Guest
I'm implementing a mobile app using @capacitor and using the geolocation plugin I'd like to ask the user to turn on its GPS and I want to do that using the native dialog box like GoogleMaps and other Apps are doing.

enter image description here

For now I was only able to show a dialog box like the one below using the Geolocation.checkPermissions() method but only after I asked the user to manually turn on the GPS. Once the user manually turned on his GPS, that method call allow me to open the following dialog box.

enter image description here

Is there some SDK of @capacitor/geolocation v5 (or other plugins) that allow me to open the dialog box I need (like the one in the first picture) ? If yes, there are some examples somewhere ?

Thanks in advance
<p>I'm implementing a mobile app using <code>@capacitor</code> and using the <code>geolocation plugin</code> I'd like to ask the user to turn on its GPS and I want to do that using the native dialog box like GoogleMaps and other Apps are doing.</p>
<p><a href="https://i.sstatic.net/MEmh9HpB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/MEmh9HpB.png" alt="enter image description here" /></a></p>
<p>For now I was only able to show a dialog box like the one below using the <code>Geolocation.checkPermissions()</code> method but only after I asked the user to manually turn on the GPS. Once the user manually turned on his GPS, that method call allow me to open the following dialog box.</p>
<p><a href="https://i.sstatic.net/DdPHBTD4.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/DdPHBTD4.png" alt="enter image description here" /></a></p>
<p>Is there some SDK of @capacitor/geolocation v5 (or other plugins) that allow me to open the dialog box I need (like the one in the first picture) ? If yes, there are some examples somewhere ?</p>
<p>Thanks in advance</p>
Continue reading...
 

Latest posts

Online statistics

Members online
0
Guests online
4
Total visitors
4
Top