flutter_bluetooth_serial
flutter_bluetooth_serial copied to clipboard
Need android.permission.BLUETOOTH_CONNECT
Problem summary
Steps to reproduce
- First step, example: "Open example app"
- Second step, example: "Turn on Bluetooth"
I followed above step but cause error
java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for AttributionSource { uid = 10498, packageName = io.github.edufolly.flutterbluetoothserialexample, attributionTag = null, token = android.os.BinderProxy@41f62ba, next = null }: getName
and I added
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
to androidmanifest.xml but it keep same and ask me nothing about permission
Environment
flutter version is 2.10.5
This is related to permission requirement changes in Android 12. Try one of the 3 open PRs that address this issue: #159, #162, or #163