Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Missing android.permission.BLUETOOTH #148

Open
josuah opened this issue Aug 6, 2024 · 5 comments · May be fixed by #172
Open

[bug] Missing android.permission.BLUETOOTH #148

josuah opened this issue Aug 6, 2024 · 5 comments · May be fixed by #172

Comments

@josuah
Copy link
Member

josuah commented Aug 6, 2024

As reported on https://discord.com/channels/963222352534048818/1270235803708166184:

If I close out the "Bring your device closer" and go into the logs this is what I get in the Bluetooth

WARNING - Couldn't obtain Bluetooth permission. PlatformException(androidException, java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10627 nor current process has android.permission.BLUETOOTH., java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10627 nor current process has android.permission.BLUETOOTH.
    at android.os.Parcel.createException(Parcel.java:2088)
    at android.os.Parcel.readException(Parcel.java:2056)
    at android.os.Parcel.readException(Parcel.java:2004)
    at android.bluetooth.IBluetooth$Stub$Proxy.getState(IBluetooth.java:3176)
    at android.bluetooth.BluetoothAdapter.getBleState(BluetoothAdapter.java:1909)
    at android.bluetooth.BluetoothAdapter.getBleEnabledArray(BluetoothAdapter.java:1392)
    at android.bluetooth.BluetoothAdapter.isBleApiAvailable(BluetoothAdapter.java:1500)
    at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:1242)
    at g3.o.E(Unknown Source:2623)
    at c4.k$a.a(Unknown Source:17)
    at r3.c.l(Unknown Source:18)
    at r3.c.m(Unknown Source:41)
    at r3.c.i(Unknown Source:0)
    at r3.b.run(Unknown Source:12)
    at android.os.Handler.handleCallback(Handler.java:883)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loop(Looper.java:237)
    at android.app.ActivityThread.main(ActivityThread.java:8167)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
, null)
INFO - Starting to scan for devices
INFO - Stopping scan for devices

Went into the "about this apps" settings and looked at the permissions. The only option there to allow or disallow is for Location.
It always shows up in Bluetooth settings as an available device.

Samsung S9+ Android 10

One someone else's phone, it asks for Location permissions and Bluetooth permissions.
It also had a different landing page where you can sign in with google instead of typing in your email.

What was attempted:

  • Restarting the phone
  • Restarting the app
  • Logging out/in of the app
  • denying location services when prompted
@CitizenOneX
Copy link
Contributor

The Flutter Blue Plus recommended AndroidManifest.xml settings to appear to be slightly different to what's currently in noa-flutter's manifest: FBP reference at least for Android versions <= 11. (E.g. maxSdkVersion attributes, absence of BLUETOOTH_ADMIN entirely etc.)

I haven't investigated how it fails due to these differences, I just always copy that whole block of permissions into the Android Manifest as-is when adding FBP to a project.

@siliconwitch
Copy link
Member

Will update these permissions 👍

@siliconwitch siliconwitch added this to Noa Aug 28, 2024
@siliconwitch siliconwitch moved this to Todo in Noa Aug 28, 2024
@alchemystack
Copy link

Doesn't ask for Bluetooth permission on Android 8.1.0 so I can't use it :(

WARNING - Couldn't obtain Bluetooth permission. PlatformException(androidException, java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10141 nor current process has android.permission.BLUETOOTH., java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10141 nor current process has android.permission.BLUETOOTH.
at android.os.Parcel.readException(Parcel.java:2013)
at android.os.Parcel.readException(Parcel.java:1959)
at android.bluetooth.IBluetooth$Stub$Proxy.getState(IBluetooth.java:908)
at android.bluetooth.BluetoothAdapter.getLeState(BluetoothAdapter.java:892)
at android.bluetooth.BluetoothAdapter.getLeAccess(BluetoothAdapter.java:905)
at android.bluetooth.BluetoothAdapter.getBluetoothLeScanner(BluetoothAdapter.java:688)
at b3.p.E(Unknown Source:2623)
at s3.k$a.a(Unknown Source:17)
at h3.c.l(Unknown Source:18)
at h3.c.m(Unknown Source:41)
at h3.c.i(Unknown Source:0)
at h3.b.run(Unknown Source:12)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6548)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:445)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
, null)
INFO - Starting to scan for devices
INFO - Stopping scan for devices

@WolframRavenwolf
Copy link

Just got my Frame and am super excited to use it - but have the same issue with the Android app not being able to scan for the glasses.

Tried the latest APK here as well as the one directly from Play Store. How can I get my Frame to pair?

@TopHatSaint
Copy link

TopHatSaint commented Dec 5, 2024 via email

@uma-shankar-TE uma-shankar-TE linked a pull request Dec 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

6 participants