Giter VIP home page Giter VIP logo

Comments (4)

dpa99c avatar dpa99c commented on July 30, 2024 1

Unfortunately there's no way to create a callback since the native iOS system dialog doesn't provide any mechanism for this - we are limited by the functionality which Apple has deemed fit to give us.
The system dialog is actually indirectly invoked by requesting location updates via the native location manager service.

The best you can do is to set a timeout before invoking the system dialog which re-checks if Location Services is on via diagnostic.isLocationEnabled(). Also if you start receiving location updates, you'll know that Location Services has been switched on.

from cordova-plugin-request-location-accuracy.

dpa99c avatar dpa99c commented on July 30, 2024

This is the expected behaviour on iOS. The system dialog is shown as a UIAlert window in the view hierarchy of the application which made the request, hence the application never gets paused or therefore resumed when the dialog is shown. Only if the user pressing the "Settings" button which opens the Settings app on the Location Services page does the app which requested the dialog get paused in the background.

from cordova-plugin-request-location-accuracy.

JeremyColton avatar JeremyColton commented on July 30, 2024

Thanks for your fast reply. So can there be a callback when the user presses the 'Cancel' button? Otherwise the app has no way to know if anything happened effectively freezing it!

from cordova-plugin-request-location-accuracy.

JeremyColton avatar JeremyColton commented on July 30, 2024

Ok, thanks for your great advice.

from cordova-plugin-request-location-accuracy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.