android linting keeps failing on Bluetooth permission
See original GitHub issueHi,
I’m trying to lint my project, but it keeps failing on this package( It builds and runs perfectly)
Execution failed for task ':react-native-incall-manager:lint'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
The first 3 errors (out of 16) were:
/Users/nsmet/Documents/work/onesmartcontrol/onetouchapp/node_modules/react-native-incall-manager/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java:267: Error: Missing permissions required by BluetoothAdapter.getProfileConnectionState: android.permission.BLUETOOTH [MissingPermission]
+ stateToString(bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nsmet/Documents/work/onesmartcontrol/onetouchapp/node_modules/react-native-incall-manager/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java:367: Error: Missing permissions required by BluetoothHeadset.getConnectedDevices: android.permission.BLUETOOTH [MissingPermission]
List<BluetoothDevice> devices = bluetoothHeadset.getConnectedDevices();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/nsmet/Documents/work/onesmartcontrol/onetouchapp/node_modules/react-native-incall-manager/android/src/main/java/com/zxcpoiu/incallmanager/AppRTC/AppRTCBluetoothManager.java:376: Error: Missing permissions required by BluetoothDevice.getName: android.permission.BLUETOOTH [MissingPermission]
Log.d(TAG, "Connected bluetooth headset: "
I added about every variant of bluetooth permissions, still no luck. At the moment I have this:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<!-- If your app targets Android 9 or lower, you can declare
ACCESS_COARSE_LOCATION instead. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
RN: 0.60.5 react-native-incall-manager: ^3.2.6
Anyone ran into this problem?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Bluetooth permissions - Android Developers
If your app makes the current device discoverable to other Bluetooth devices, declare the BLUETOOTH_ADVERTISE permission. If your app communicates with already ...
Read more >Analyze code with Lint for calls that require permissions
First click on Hector the Inspector (the small icon of a man with a moustache at the very bottom-right of Android Studio).
Read more >A list of all Android permissions - Hacker News
This keeps Android from having the simple install models we've come to expect ... The linter will give you warnings on some permissions....
Read more >Android Lint incorrectly reports missing location permission
Lint in Android Studio 3.0c7 shouldn't report "Missing permissions required by TelephonyManager.getAllCellInfo: android.permission.
Read more >Problem with bluetooth permissions - Processing for Android
java.lang.SecurityException : Need android.permission.BLUETOOTH_CONNECT permission for AttributionSource { uid = 10015, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also facing this issue. I think maybe THIS project needs to add the permission to its manifest file.
Me too! Help!