steep-balloon-41261
07/10/2023, 12:36 PMfreezing-lifeguard-43174
07/11/2023, 4:53 AM<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
In order to get the correct name of the Bluetooth device.freezing-lifeguard-43174
07/11/2023, 5:04 AM<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
You can try to add the permission label above, and use the code here to apply for bluetoothConnect permission, then you should be able to get the correct bluetooth device label.
import 'package:permission_handler/permission_handler.dart';
Future<void> _checkPremissions() async {
var status = await Permission.bluetooth.request();
if (status.isPermanentlyDenied) {
print('Bluetooth Permission disabled');
}
status = await Permission.bluetoothConnect.request();
if (status.isPermanentlyDenied) {
print('Bluetooth Connect Permission disabled');
}
}
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await _checkPremissions();
runApp(MyApp());
}