Coder Social home page Coder Social logo

Comments (11)

mvanbeusekom avatar mvanbeusekom commented on June 10, 2024

Hi @SteMMo33,

According to the log message it seems like you are missing a particular permission in your app/src/main/AndroidManifest.xml file. Based on the code snippet included in your issue description the missing permissions would be android.permission.BLUETOOTH_ADVERTISE.

Can you try adding this particular permission to your app/src/main/AndroidManifest.xml file and let us know if that helped?

from flutter-permission-handler.

SteMMo33 avatar SteMMo33 commented on June 10, 2024

Hello,
just added the additional permission but the result is the same:

D/permissions_handler(28499): Bluetooth permission missing in manifest
I/mali_gralloc(28499): register: id=0x2fe00000ae1, importpid=-1
D/CompatibilityChangeReporter(28499): Compat change id reported: 78294732; UID 10233; state: DISABLED
I/flutter (28499): Statues: {Permission.location: PermissionStatus.granted, Permission.bluetooth: PermissionStatus.denied, Permission.bluetoothScan: PermissionStatus.granted, Permission.bluetoothAdvertise: PermissionStatus.granted, Permission.bluetoothConnect: PermissionStatus.granted}
I/flutter (28499): [scan] NoPermissionDlg

Thanks!

from flutter-permission-handler.

Blue-Cheesecake avatar Blue-Cheesecake commented on June 10, 2024

Which version of Android API that you used? I got this similar problem on API 28, and 31 but work fine on API 33, and 34 (Don't know why). Try to test your app on different Android API.

@SteMMo33

from flutter-permission-handler.

SteMMo33 avatar SteMMo33 commented on June 10, 2024

In the SDK Manager I set Android 14.0 - API 34 rev.2 - not 34-ext8 or 34-ext10.
Hope this help ..

from flutter-permission-handler.

SteMMo33 avatar SteMMo33 commented on June 10, 2024

@Blue-Cheesecake
Now the context is:

  • running on phone with Android 13 - API 33
  • compileSdkVersion 33
  • targetSdkVersion 33

In the 'Run' window I see:

D/permissions_handler( 3216): Bluetooth permission missing in manifest
I/flutter ( 3216): Statues: {Permission.location: PermissionStatus.granted, Permission.bluetooth: PermissionStatus.denied, Permission.bluetoothScan: PermissionStatus.granted, Permission.bluetoothAdvertise: PermissionStatus.granted, Permission.bluetoothConnect: PermissionStatus.granted}
I/flutter ( 3216): [scan] NoPermissionDlg

I'm wondering why it reports 'Bluetooth permission missing in the manifest' ..

from flutter-permission-handler.

mvanbeusekom avatar mvanbeusekom commented on June 10, 2024

Hi @SteMMo33,

Sorry for the late reply (holiday got in the way). One thing I just thought of, during compile time the Android compiler will merge different AndroidManifests (including manifest specified in libraries) into one final manifest. On possibility would be that the bluetooth permission is removed during this merge proces. Luckily Android keeps a log file of the merge process which can be found in the build/app/outputs/logs folder.

Could you go through this log file to check if the bluetooth permissions are added? Alternatively feel free to share the log here so we can help analyse it (not sure if the file contains sensitive information though).

from flutter-permission-handler.

ray007 avatar ray007 commented on June 10, 2024

When I'm checking permission for bluetooth on android, it seems to be denied.
Trying to request it does not change it.

But I can ignore that and get permission for bluetoothScan, which works as expected...

from flutter-permission-handler.

malgorzatakus avatar malgorzatakus commented on June 10, 2024

Bluetooth permission is a legacy permission for older devices as you have in manifest android:maxSdkVersion="30"

So you are requesting a permission that you are not able to get granted since it is not there any more for your sdk. See here about bluetooth permissions: https://developer.android.com/develop/connectivity/bluetooth/bt-permissions

Is that make sense?

from flutter-permission-handler.

ray007 avatar ray007 commented on June 10, 2024

Would be nice if such legacy permissions were recognized as such and considered automatically granted.

from flutter-permission-handler.

SteMMo33 avatar SteMMo33 commented on June 10, 2024

Thanks a lot for the link.
I think it is a little complex but I'll study the official documentation.
Thanks again.

from flutter-permission-handler.

mvanbeusekom avatar mvanbeusekom commented on June 10, 2024

Would be nice if such legacy permissions were recognized as such and considered automatically granted.

Problem is that the Bluetooth permission has been replaced with more fine grained permissions starting from Android API 30. In other words on API 29 and below the permission is still valid, while on API 30 you'd have to use BLUETOOTH_SCAN, BLUETOOTH_CONNECT and BLUETOOTH_ADVERTISE instead. The old BLUETOOTH permission is no longer valid, returning an automatic granted would give a false positive.

from flutter-permission-handler.

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.