Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsVirlual returns 'true' in real device #150

Open
1 of 3 tasks
selmo47 opened this issue Jan 13, 2022 · 1 comment
Open
1 of 3 tasks

IsVirlual returns 'true' in real device #150

selmo47 opened this issue Jan 13, 2022 · 1 comment

Comments

@selmo47
Copy link

selmo47 commented Jan 13, 2022

Bug Report

Problem

IsVirlual returns 'true' in a real device

  • Phone: Huawei P20 Pro
  • model: CLT-L29

What is expected to happen?

expected to return false

What does actually happens?

it returns true

Information

  • phone: Huawei P20 Pro
  • model: CLT-L29
  • Ionic 3
  • plugin version: 2.0.3

Command or Code

device.isVirtual

Environment, Platform, Device

  • Phone: Huawei P20 Pro
  • model: CLT-L29
  • Platform: Android

Version information

  • Ionic 3
  • plugin version: 2.0.3
  • Android Version: 8.1

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to the most recent version
  • I included all the necessary information above
@breautek
Copy link
Contributor

The plugin does this to determine if the device is virtual:

public boolean isVirtual() {
return android.os.Build.FINGERPRINT.contains("generic") ||
android.os.Build.PRODUCT.contains("sdk");
}

Are you able to update this function to log out the values of android.os.Build.FINGERPRINT and android.os.Build.PRODUCT?

The huawei device must have generic in the finterprint, or sdk in it's product name, it will be good to know which one (or maybe both) are tripping this check. Then we'll need to A/B test against a huawei simulator to determine how we can change our condition

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants