简体   繁体   中英

What is the best way to check that an Android app is running on windows subsystem for android of windows11?

I preparing application for mobile and WSA (Windows Subsystem for Android).

I need to Android app is running on which platforms to develop the application in preparation.

Hardware or CPU architecture is seems to inaccurate.

Any good ideas?

Thank you in advance.

The easiest way to detect that we are running in a WSA environment is to use the Build class. Examples:

  • Build.BRAND will be "Windows"
  • Build.BOARD will be "windows"
  • Build.MANUFACTURER will be "Microsoft Corporation"
  • Build.MODEL will be "Subsystem for Android(TM)"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM