I want to detect the difference between an emulator and a real device. I use the device_info_plus package to determine whether the device is an emulator or a real device. It works well, but when I try to run my app and test it in Bluestacks, NoxPlayer, or LDPlayer, it doesn’t work. When I run it in those emulators, the result is that it detects the device as a real device. How can I solve this problem?
I am trying to run my app on emulators such as Bluestacks, NoxPlayer, and LDPlayer to test whether it is running on an emulator or a real device. However, the emulators are being detected as real devices. How can I fix this?
2
Answers
I have found a solution to the problem:
Add the get_radio_version_plugin: ^0.0.1-beta* plugin to your pubspec.yaml file.
Get the value of radioVersion and compare it to the following values:
If radioVersion is equal to any of these values, then the device is an emulator. Otherwise, the device is a real device.
>> Image Result <<
Try this:
I assure you that it is more accurate than
androidInfo.isPhysicalDevice
.OR
Try this: safe_device