react-native-incall-manager
react-native-incall-manager copied to clipboard
android linting keeps failing on Bluetooth permission
Hi,
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:
* What went wrong:
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 20) were:
/Users/choegeun-won/Documents/GitHub/aha/AhaApp/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_CONNECT [MissingPermission]
+ stateToString(bluetoothAdapter.getProfileConnectionState(BluetoothProfile.HEADSET)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/choegeun-won/Documents/GitHub/aha/AhaApp/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_CONNECT [MissingPermission]
List<BluetoothDevice> devices = bluetoothHeadset.getConnectedDevices();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/choegeun-won/Documents/GitHub/aha/AhaApp/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_CONNECT [MissingPermission]
Log.d(TAG, "Connected bluetooth headset: "
And above is my AndroidManifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.aha.app.aha">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
RN: 0.66.3 react-native-incall-manager: ^3.3.0
Anyone ran into this problem?