[英]Flutter - Get/Set Android and IOS device user name for Bluetooth/Wifi discovery
I tried to use the device_info_plus package but I could not find no options for getting or setting the Android or Ios device user name so that it appears as Someone's Iphone
on wifi/bluetooth discovery.我尝试使用 device_info_plus package 但我找不到获取或设置 Android 或 Ios 设备用户名的选项,因此它显示为
Someone's Iphone
发现/wifi。 Is not there any method to achieve that?没有任何方法可以实现吗?
import 'package:device_info/device_info.dart';
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidInfo = await deviceInfo.androidInfo;
print('Running on ${androidInfo.model}'); // e.g. "Moto G (4)"
IosDeviceInfo iosInfo = await deviceInfo.iosInfo;
print('Running on ${iosInfo.utsname.machine}'); // e.g. "iPod7,1"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.