Open Capricornwqh opened 2 years ago
Hey @Capricornwqh, I used this plugin on my Android device (Android 12) and it's working fine. Can you tell what's the error?
which item you used? AndroidDeviceInfo.device or AndroidDeviceInfo.display? more precisely, i need display Bluetooth Device Name.
I don't think it's for fetching your Bluetooth device name.
other devices will see this name when use Bluetooth, Personal hotspot and USB. whaterver, AndroidDeviceInfo can't find this name.
The device name can looked up on android with the following (kotlin).
import android.provider.Settings
val name = Settings.Global.getString(applicationContext.contentResolver, "device_name")
You can try using global settings list package to look this up.
import 'package:global_settings_list/global_settings_list.dart';
String? name = await GlobalSettingsList.deviceName;
Plugin
device_info_plus
Use case
AndroidDeviceInfo can't find device name
Proposal
AndroidDeviceInfo and IosDeviceInfo need add device name item