Reputation: 118
I am working on a very simple webview browser app that loads one of our internal web apps onto an android device in full screen. This web app requires a terminal query param attached to the url (http://example.com/?terminal={deviceName}) so I need to get the name of the device and pass that to the url when starting the app
I have looked into the device_info flutter package but it doesn't seem to get the device name I need. I need this one
This is the data that I know I can get from the package but none of the return H01
Map<String, dynamic> _readAndroidBuildData(AndroidDeviceInfo build) {
return <String, dynamic>{
'version.securityPatch': build.version.securityPatch,
'version.sdkInt': build.version.sdkInt,
'version.release': build.version.release,
'version.previewSdkInt': build.version.previewSdkInt,
'version.incremental': build.version.incremental,
'version.codename': build.version.codename,
'version.baseOS': build.version.baseOS,
'board': build.board,
'bootloader': build.bootloader,
'brand': build.brand,
'device': build.device,
'display': build.display,
'fingerprint': build.fingerprint,
'hardware': build.hardware,
'host': build.host,
'id': build.id,
'manufacturer': build.manufacturer,
'model': build.model,
'product': build.product,
'supported32BitAbis': build.supported32BitAbis,
'supported64BitAbis': build.supported64BitAbis,
'supportedAbis': build.supportedAbis,
'tags': build.tags,
'type': build.type,
'isPhysicalDevice': build.isPhysicalDevice,
'androidId': build.androidId,
'systemFeatures': build.systemFeatures,
};
}
Can anyone help?
Upvotes: 3
Views: 1171
Reputation: 44056
Is device name something you personally assign to identify it to you? If so, the movement by both ios and android camps is to prevent apps from distinguishing one device from another. You can get make and model and other info, but nothing specifically identifying it.
Upvotes: 2