Git Product home page Git Product logo

Comments (3)

philips77 avatar philips77 commented on May 18, 2024

Hi, Since Marshmallow you have to request Location permission (fine or coarse) in order to scan for Bluetooth LE devices. This is a Runtime permission, so you have to ask user to allow.
Check out this link: https://developer.android.com/training/permissions/requesting

Bluetooth LE devices, like beacons, can reveal phone's location. That's why user needs to allow it. Also, on most devices the Location must be enabled in the phone.

from android-scanner-compat-library.

trongkhanh avatar trongkhanh commented on May 18, 2024

Thanks you for response, philips77. But in AndroidManifest file, i requested Location permission as following:
uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
uses-permission android:name="android.permission.BLUETOOTH" />
uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />

But App only scan device android < 6.0.1, cannot scan device Sony Xperia Z3 android 6.0.1.

from android-scanner-compat-library.

philips77 avatar philips77 commented on May 18, 2024

That's a Runtime permission. You have to request it from the app, not only in the manifest. Read the link i have above.

from android-scanner-compat-library.

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.