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

Viewed 121

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.

1 Answers

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)"
Related