Git Product home page Git Product logo

Comments (3)

adhambadr avatar adhambadr commented on July 28, 2024 1

for newer versions of Android just use this plugin https://github.com/NeoLSN/cordova-plugin-android-permissions , request / check for the ACCESS_COARSE / FINE permission & in the success callback start the scan. It worked for me @ SDK 25

from wifiwizard.

ytfhwfnh avatar ytfhwfnh commented on July 28, 2024

In my ionic2 project:

AndroidManifest.xml I used:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

project.properties I used:
target=android-23

I can permit ACCESS_COARSE_LOCATION.

No authorization dialog box is displayed in other cases.

from wifiwizard.

chr4ss1 avatar chr4ss1 commented on July 28, 2024

For Android6.0(SDK >= 23), they have changed the permissions model, now you have to ask permissions manually inside the app as far I know - uses-permission doesn't do anything.

As far I understand, the reason why it works is that you're compiling against targetSdkVersion="22" (Android <= 5.1) which has backwards compability with newer androids as well. If you use that SDK version, your app will have those permissions by default.

You can get the same effect if you add this line to config.xml:

<preference name="android-targetSdkVersion" value="22"/>

from wifiwizard.

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.