question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BLUETOOTH permission is listed as optional in docs but seems to be required

See original GitHub issue

The Android setup docs under Step 2 - Add permissions to your AndroidManifest.xml: list the BLUETOOTH permission as optional but I am seeing a consistent crash for at least a Samsung SM-925T. I have not tested enough to determine if this is device specific but either way it should not happen. It causes our app to go into a crash/restart cycle of sometimes more than 10 times.

02-02 10:09:11.688 13384-13405/? E/BluetoothAdapter: Application does not have bluetooth permission, registering is failed
02-02 10:09:11.688 13384-13405/? E/BluetoothAdapter: java.lang.SecurityException: Need BLUETOOTH permission: Neither user 10348 nor current process has android.permission.BLUETOOTH.
                                                         at android.os.Parcel.readException(Parcel.java:1620)
                                                         at android.os.Parcel.readException(Parcel.java:1573)
                                                         at android.bluetooth.IBluetoothManager$Stub$Proxy.registerStateChangeCallback(IBluetoothManager.java:350)
                                                         at android.bluetooth.BluetoothAdapter.<init>(BluetoothAdapter.java:594)
                                                         at android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:576)
                                                         at com.mixpanel.android.mpmetrics.SystemInformation.isBluetoothEnabled(SystemInformation.java:141)
                                                         at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.getDefaultEventProperties(AnalyticsMessages.java:559)
                                                         at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.prepareEventObject(AnalyticsMessages.java:573)
                                                         at com.mixpanel.android.mpmetrics.AnalyticsMessages$Worker$AnalyticsMessageHandler.handleMessage(AnalyticsMessages.java:251)
                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                         at android.os.Looper.loop(Looper.java:158)
                                                         at android.os.HandlerThread.run(HandlerThread.java:61)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:22 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
pateditcommented, Mar 2, 2017

Hehe, I know. This crash is pretty crazy (hence my interest of including the permission in the AndroidManifest.xml). I suspect it’s an OEM implementation that I’d need to dig into.

1reaction
RockyLincommented, Aug 15, 2017

@patedit Samsung s7 Edge Android 7.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Allow apps to specify optional permissions in the manifest
In many cases, applications request permissions that are noncritical for basic functionality in order to provide the user with maximum convenience.
Read more >
Manifest.permission - Android Developers
Old permission for deleting an app's cache files, no longer used, but signals for us to quietly ignore calls instead of throwing an...
Read more >
Apply settings for Android mobile devices - Google Support
Find and set Android settings · (Optional) On the left, select the organizational unit you want to apply the settings to. · Click...
Read more >
Extension Permissions
Permission warnings are shown to the user at a number of different times: Installation; Requesting optional permissions; Updating to a new version that...
Read more >
App Permissions on Android & How to Control Them - AVG
But some apps need permissions to function properly. ... If you'd rather take a look at the Android app permissions list and choose...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found