Skip to content

Commit ac1c978

Browse files
authored
Merge branch 'MicrosoftDocs:docs' into powertoys-run-valuegenerator-docs
2 parents 715987e + da9d22e commit ac1c978

File tree

126 files changed

+6687
-1443
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+6687
-1443
lines changed

.openpublishing.redirection.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1930,11 +1930,6 @@
19301930
"redirect_url": "/windows/uwp/devices-sensors/",
19311931
"redirect_document_id": false
19321932
},
1933-
{
1934-
"source_path": "uwp/devices-sensors/host-card-emulation.md",
1935-
"redirect_url": "/windows/uwp/devices-sensors/",
1936-
"redirect_document_id": false
1937-
},
19381933
{
19391934
"source_path": "uwp/devices-sensors/generate-3mf.md",
19401935
"redirect_url": "/windows/uwp/devices-sensors/3d-generate-3mf",

hub/android/wsa/index.md

Lines changed: 70 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ms.author: mattwoj
66
ms.reviewer: mousma
77
manager: jken
88
ms.topic: article
9-
ms.date: 02/13/2023
9+
ms.date: 06/06/2023
1010
---
1111

1212
# Windows Subsystem for Android™️
@@ -24,9 +24,9 @@ For more information or support:
2424

2525
This guide can help you test and debug your Android app on Windows:
2626

27-
- [Set up your development environment](#set-up-your-development-environment), including [prerequisites](#prerequisites), [installing the Amazon Appstore](#install-the-amazon-appstore), and using the [Settings app](#windows-subsystem-for-android-settings-app).
28-
- Handle input compatibility considerations for Windows devices, such as: [keyboard input](#keyboard-input), [mouse input](#mouse-input), and [window management and resizing](#window-management-and-resizing).
27+
- [Set up your development environment](#set-up-your-development-environment), including [prerequisites](#prerequisites), [installing the Amazon Appstore](#install-the-amazon-appstore), and using the [Settings](#windows-subsystem-for-android-settings).
2928
- [Test and debug](#test-and-debug) your app on a Windows 11 device.
29+
- Handle input compatibility considerations for Windows devices, such as: [keyboard input](#keyboard-input), [mouse input](#mouse-input), and [window management and resizing](#window-management-and-resizing).
3030
- [Troubleshoot and find answers](#troubleshooting-issues).
3131

3232
## Developer GitHub
@@ -49,22 +49,85 @@ Windows Subsystem for Android is available on Windows 11. Your device must meet
4949

5050
The Microsoft Store will automatically install Windows Subsystem for Android silently in the background when either of the two following user actions are taken:
5151

52-
1. Install the Amazon Appstore from the Microsoft Store. Selecting **Get** will begin the installation of the app.
52+
1. Install the [Amazon Appstore from the Microsoft Store](https://www.microsoft.com/store/productId/9NJHK44TTKSX). Selecting **Get** will begin the installation of the app.
5353
2. Install an Android app from the Microsoft Store for the first time, which will also install the Amazon Appstore.
5454

55-
The Amazon Appstore and the Windows Subsystem for Android Settings app will then appear in the Windows 11 Start menu and be available on search, offering a catalogue of Android apps.
55+
The **Amazon Appstore** app will then appear in the Windows 11 Start menu and be available on search, offering a catalogue of Android apps. The **Windows Subsystem for Android** app, which lets you control mobile app settings and features, will also appear in the Start menu.
5656

5757
![Screenshot of Microsoft Store page featuring the Get button on the Amazon App Store](../../images/wsa-amazon-appstore-get.png)
5858

5959
> [!NOTE]
6060
> The Amazon Appstore on Windows (a requirement for running Android apps on Windows 11) is available in [select regions](https://support.microsoft.com/windows/countries-and-regions-that-support-amazon-appstore-on-windows-d8dd17c7-5994-4187-9527-ddb076f9493e?preview=true).
6161
62-
## Windows Subsystem for Android™️ Settings app
62+
## Windows Subsystem for Android™️ Settings
6363

64-
To access the Windows Subsystem for Android Settings app, go to: **Start > All Apps > Windows Subsystem for Android™️ Settings**. Learn more about specific settings app features: [Manage settings for mobile apps on Windows](https://support.microsoft.com/windows/000f97e8-8c20-490e-9ef4-cd90d903f847).
64+
To modify Windows Subsystem for Android settings, go to: **Start > All Apps > Windows Subsystem for Android™️**. Learn more about specific settings app features: [Manage settings for mobile apps on Windows](https://support.microsoft.com/windows/000f97e8-8c20-490e-9ef4-cd90d903f847).
6565

6666
![Screenshot of Latte app settings](../../images/wsa-settings.png)
6767

68+
## Test and debug
69+
70+
To test and debug your app on a Windows 11 device using the Windows Subsystem for Android the following set up steps are required.
71+
72+
### Enable developer mode in Windows Settings
73+
74+
You must first enable developer mode. Open the **[Windows Subsystem for Android™️](#windows-subsystem-for-android-settings)** settings. Once open, enable **Developer mode** under **Advanced settings**.
75+
76+
### Connect to the Windows Subsystem for Android for debugging
77+
78+
To connect to the Windows Subsystem for Android VM for debugging:
79+
80+
1. Launch an Android app that was installed using the Amazon Appstore.
81+
82+
2. You can connect using adb connect with the following command (you must have [adb installed](https://developer.android.com/studio/command-line/adb)):
83+
84+
```powershell
85+
adb connect 127.0.0.1:58526
86+
```
87+
88+
### Connect to a test device
89+
90+
To connect to a test device (with Windows Subsystem for Android installed) on the same network from Windows/Mac:
91+
92+
1. On the test device (where Windows Subsystem for Android is installed) open a PowerShell window and identify the IP address of the test device by running the command:
93+
94+
```powershell
95+
ipconfig
96+
```
97+
98+
2. Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
99+
100+
```console
101+
adb connect <TEST DEVICE IP ADDRESS>:58526
102+
```
103+
104+
The `<TEST DEVICE IP ADDRESS>` can be found in the output of "ipconfig" from the test device. You can also deploy and debug apps from Android Studio.
105+
106+
To use Android Debug Bridge (ADB) to connect your development workstation directly to your Android device so you can install packages and evaluate changes, see [Android Debug Bridge in the Android Open Source Project docs](https://source.android.com/setup/build/adb).
107+
108+
### Debug your app
109+
110+
While apps should be installed using the Amazon Appstore, debugging an Android app on a Windows device is possible using an APK (Android application package) and adb (Android Debug Bridge).
111+
112+
To debug an APK using adb:
113+
114+
1. Follow the steps to connect to the Windows Subsystem for Android VM above.
115+
116+
2. Install the APK using the adb install command: `adb install app-debug.apk`
117+
118+
Expected Output:
119+
120+
```powershell
121+
Performing Streamed Install
122+
Success
123+
```
124+
125+
3. A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
126+
127+
### Building Universal APKs
128+
129+
Windows Subsystem for Android utilizes Intel Bridge Technology to enable Arm applications on x86 based processors. Arm applications will run on Arm-based processors natively. The emulation layer will induce a performance overhead – for optimal performance, submit your application for both the x86-64 and Arm64 architectures.
130+
68131
## Input compatibility considerations for Windows devices
69132
70133
There are a few unique input behaviors to consider that will likely require updates to your Android app code, designed for handheld devices, to be compatible when running on a Windows desktop device via the Amazon Appstore.
@@ -138,73 +201,6 @@ Developing Android applications for a multi-window environment has an impact on
138201
139202
See the [Android documentation](https://developer.android.com/guide/components/activities/activity-lifecycle) for a description of the lifecycle events. More often than not, you’ll want to use the `onStop` event and not the `onPause` or `onUserLeaveHint` events. In fact, many multi-window Android implementations do not deliver the `onUserLeaveHint` notification, and thus any business critical logic that might be in that event handler will not be called on these platforms, including Windows Subsystem for Android.
140203
141-
## Test and debug
142-
143-
To test and debug your app on a Windows 11 device using the Windows Subsystem for Android the following set up steps are required.
144-
145-
### Enable developer mode in Windows Settings
146-
147-
You must first enable developer mode in Windows Settings. There are three ways to enable developer mode:
148-
149-
- Open the [Windows Subsystem for Android Settings app](#windows-subsystem-for-android-settings-app). Once open, enable **Developer Mode**.
150-
- Search for “Developer Settings” in Windows search.
151-
- Navigate to Settings > Privacy and Security > For developers > Developer mode.
152-
153-
### Connect to the Windows Subsystem for Android for debugging
154-
155-
To connect to the Windows Subsystem for Android VM for debugging:
156-
157-
1. Launch an Android app that was installed using the Amazon Appstore.
158-
159-
2. You can connect using adb connect with the following command (you must have [adb installed](https://developer.android.com/studio/command-line/adb)):
160-
161-
```powershell
162-
adb connect 127.0.0.1:58526
163-
```
164-
165-
### Connect to a test device
166-
167-
To connect to a test device (with Windows Subsystem for Android installed) on the same network from Windows/Mac:
168-
169-
1. On the test device (where Windows Subsystem for Android is installed) open a PowerShell window and identify the IP address of the test device by running the command:
170-
171-
```powershell
172-
ipconfig
173-
```
174-
175-
2. Using the debugging device terminal where Android Studio and the Android SDK is installed (Mac/Windows), enter the command:
176-
177-
```console
178-
adb connect <TEST DEVICE IP ADDRESS>:58526
179-
```
180-
181-
The `<TEST DEVICE IP ADDRESS>` can be found in the output of "ipconfig" from the test device. You can also deploy and debug apps from Android Studio.
182-
183-
To use Android Debug Bridge (ADB) to connect your development workstation directly to your Android device so you can install packages and evaluate changes, see [Android Debug Bridge in the Android Open Source Project docs](https://source.android.com/setup/build/adb).
184-
185-
### Debug your app
186-
187-
While apps should be installed using the Amazon Appstore, debugging an Android app on a Windows device is possible using an APK (Android application package) and adb (Android Debug Bridge).
188-
189-
To debug an APK using adb:
190-
191-
1. Follow the steps to connect to the Windows Subsystem for Android VM above.
192-
193-
2. Install the APK using the adb install command: `adb install app-debug.apk`
194-
195-
Expected Output:
196-
197-
```powershell
198-
Performing Streamed Install
199-
Success
200-
```
201-
202-
3. A successful “app installed” notification will appear in the Windows notification menu and the app will launch once selected.
203-
204-
### Building Universal APKs
205-
206-
Windows Subsystem for Android utilizes Intel Bridge Technology to emulate Arm applications on x86 based processors. Arm applications will run on Arm based processors natively. The emulation layer will induce a performance overhead – for optimal performance, submit your application for both the x86-64 and Arm64 architectures.
207-
208204
## VM lifecycle considerations
209205
210206
Windows Subsystem for Android utilizes a virtual machine (VM) which provides compatibility with the [AOSP framework](https://source.android.com/) and devices like keyboards, mice, touch, pen, etc.

hub/android/wsa/preview-program.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Windows Subsystem for Android™️ is available on Windows 11.
2929

3030
- Your device must meet specific requirements. [Install mobile apps and the Amazon Appstore: Device requirements](https://support.microsoft.com/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c).
3131
- You must have the [Amazon Appstore installed](https://support.microsoft.com/windows/install-mobile-apps-and-the-amazon-appstore-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c) on your Windows 11 device to participate in the preview. An Amazon account is also required to download mobile apps from the Amazon Appstore.
32-
- Windows Subsystem for Android™️ is currently only available in the US.
32+
- Windows Subsystem for Android™️ is currently available in [select countries and regions](https://support.microsoft.com/windows/countries-and-regions-that-support-amazon-appstore-on-windows-d8dd17c7-5994-4187-9527-ddb076f9493e).
3333

3434
## Sign Up
3535

hub/android/wsa/release-notes.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ ms.date: 03/15/2023
1313

1414
These release notes are based on updates to the Windows Subsystem for Android™️. For basic information on how to install and run Android™️ apps on Windows, see the Support article: [Installing the Amazon Appstore and Android™️ Apps](https://support.microsoft.com/windows/mobile-apps-and-the-windows-subsystem-for-android-f8d0abb5-44ad-47d8-b9fb-ad6b1459ff6c).
1515

16+
## Build 2304.40000.3.0
17+
18+
June 1, 2023
19+
- Package verification for apps on WSA: Android apps are scanned using anti-virus software installed on Windows prior to app installation.
20+
- Ability for users to configure how much memory to assign to Android
21+
- Android apps will be launched when a user opens the supported app link from any app (Android AppLink support)
22+
- Linux kernel updated to 5.15.94
23+
- Improvements to platform reliability and performance
24+
1625
## Build 2303.40000.3.0
1726

1827
April 11, 2023

hub/apps/design/controls/pivot.md

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ This XAML creates a NavigationView with 3 sections of content, like the example
7979
<NavigationViewItem Content="Section 2" x:Name="Section2Content" />
8080
<NavigationViewItem Content="Section 3" x:Name="Section3Content" />
8181
</NavigationView.MenuItems>
82+
83+
<Frame x:Name="ContentFrame" />
8284
</NavigationView>
8385

8486
<Page x:Class="AppName.Section1Page">
@@ -99,27 +101,26 @@ NavigationView provides more control over navigation customization and requires
99101
```csharp
100102
private void NavView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args)
101103
{
102-
FrameNavigationOptions navOptions = new FrameNavigationOptions();
103-
navOptions.TransitionInfoOverride = new SlideNavigationTransitionInfo() {
104-
SlideNavigationTransitionDirection=args.RecommendedNavigationTransitionInfo
105-
};
106-
107-
navOptions.IsNavigationStackEnabled = False;
108-
109-
switch (item.Name)
110-
{
111-
case "Section1Content":
112-
ContentFrame.NavigateToType(typeof(Section1Page), null, navOptions);
113-
break;
114-
115-
case "Section2Content":
116-
ContentFrame.NavigateToType(typeof(Section2Page), null, navOptions);
117-
break;
118-
119-
case "Section3Content":
120-
ContentFrame.NavigateToType(typeof(Section3Page), null, navOptions);
121-
break;
122-
}
104+
var navOptions = new FrameNavigationOptions
105+
{
106+
TransitionInfoOverride = args.RecommendedNavigationTransitionInfo,
107+
IsNavigationStackEnabled = false,
108+
};
109+
110+
switch (args.InvokedItemContainer.Name)
111+
{
112+
case nameof(Section1Content):
113+
ContentFrame.NavigateToType(typeof(Section1Page), null, navOptions);
114+
break;
115+
116+
case nameof(Section2Content):
117+
ContentFrame.NavigateToType(typeof(Section2Page), null, navOptions);
118+
break;
119+
120+
case nameof(Section3Content):
121+
ContentFrame.NavigateToType(typeof(Section3Page), null, navOptions);
122+
break;
123+
}
123124
}
124125
```
125126

hub/apps/design/globalizing/loc-international-fonts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ In the following table, the "Language tag" column lists the [BCP-47 language tag
3232
| Central Kurdish (Arabic) | ku-ARAB-IQ | Segoe UI |
3333
| Cherokee (Cherokee) | chr-CHER-US | Gadugi |
3434
| Chinese Simplified | zh-CN | Microsoft YaHei UI |
35-
| Chinese Traditional (Hong Kong) | zh-HK | Microsoft JhengHei UI |
35+
| Chinese Traditional (Hong Kong Special Administrative Region) | zh-HK | Microsoft JhengHei UI |
3636
| Chinese Traditional (Taiwan) | zh-TW | Microsoft JhengHei UI |
3737
| Croatian | hr-HR | Segoe UI |
3838
| Czech | cs-CZ | Segoe UI |

hub/apps/design/globalizing/use-utf8-code-page.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
description: How to use UTF code pages in Windows apps.
32
title: Use UTF-8 code pages in Windows apps
4-
ms.date: 01/11/2022
3+
description: How to use UTF code pages in Windows apps.
4+
ms.date: 06/21/2023
55
ms.topic: article
66
ms.custom: seo-windows-dev
77
---
@@ -16,7 +16,10 @@ UTF-8 is the universal code page for internationalization and is able to encode
1616

1717
As of Windows Version 1903 (May 2019 Update), you can use the ActiveCodePage property in the appxmanifest for packaged apps, or the fusion manifest for unpackaged apps, to force a process to use UTF-8 as the process code page.
1818

19-
You can declare this property and target/run on earlier Windows builds, but you must handle legacy code page detection and conversion as usual. With a minimum target version of Windows Version 1903, the process code page will always be UTF-8 so legacy code page detection and conversion can be avoided.
19+
> [!NOTE]
20+
> GDI doesn't currently support setting the ActiveCodePage property per process. Instead, GDI defaults to the active system codepage. To configure your app to render UTF-8 text via GDI, go to Windows **Settings** > **Time \& language** > **Language \& region** > **Administrative language settings** > **Change system locale**, and check **Beta: Use Unicode UTF-8 for worldwide language support**. Then reboot the PC for the change to take effect.
21+
22+
You can declare the ActiveCodePage property, and target/run on earlier Windows builds, but you must handle legacy code page detection and conversion as usual. With a minimum target version of Windows Version 1903, the process code page will always be UTF-8, so legacy code page detection and conversion can be avoided.
2023

2124
> [!NOTE]
2225
> An encoded character takes between 1 and 4 bytes. UTF-8 encoding supports longer byte sequences, up to 6 bytes, but the biggest code point of Unicode 6.0 (U+10FFFF) only takes 4 bytes.
@@ -59,22 +62,23 @@ You can declare this property and target/run on earlier Windows builds, but you
5962
```
6063

6164
> [!NOTE]
62-
> Add a manifest to an existing executable from the command line with `mt.exe -manifest <MANIFEST> -outputresource:<EXE>;#1`
65+
> Add a manifest to an existing executable from the command line with `mt.exe -manifest <MANIFEST> -outputresource:<EXE>;#1`.
6366
6467
## -A vs. -W APIs
6568

6669
Win32 APIs often support both -A and -W variants.
6770

6871
-A variants recognize the ANSI code page configured on the system and support `char*`, while -W variants operate in UTF-16 and support `WCHAR`.
6972

70-
Until recently, Windows has emphasized "Unicode" -W variants over -A APIs. However, recent releases have used the ANSI code page and -A APIs as a means to introduce UTF-8 support to apps. If the ANSI code page is configured for UTF-8, -A APIs typically operate in UTF-8. This model has the benefit of supporting existing code built with -A APIs without any code changes.
73+
Until recently, Windows has emphasized "Unicode" -W variants over -A APIs. However, recent releases have used the ANSI code page and -A APIs as a means to introduce UTF-8 support to apps. If the ANSI code page is configured for UTF-8, then -A APIs typically operate in UTF-8. This model has the benefit of supporting existing code built with -A APIs without any code changes.
7174

7275
## Code page conversion
7376

74-
As Windows operates natively in UTF-16 (`WCHAR`), you might need to convert UTF-8 data to UTF-16 (or vice versa) to interoperate with Windows APIs.
77+
Because Windows operates natively in UTF-16 (`WCHAR`), you might need to convert UTF-8 data to UTF-16 (or vice versa) to interoperate with Windows APIs.
7578

7679
[MultiByteToWideChar](/windows/desktop/api/stringapiset/nf-stringapiset-multibytetowidechar) and [WideCharToMultiByte](/windows/desktop/api/stringapiset/nf-stringapiset-widechartomultibyte) let you convert between UTF-8 and UTF-16 (`WCHAR`) (and other code pages). This is particularly useful when a legacy Win32 API might only understand `WCHAR`. These functions allow you to convert UTF-8 input to `WCHAR` to pass into a -W API and then convert any results back if necessary.
77-
When using these functions with `CodePage` set to `CP_UTF8`, use `dwFlags` of either `0` or `MB_ERR_INVALID_CHARS`, otherwise an `ERROR_INVALID_FLAGS` occurs.
80+
81+
Use `dwFlags` of either `0` or `MB_ERR_INVALID_CHARS` when using these functions with `CodePage` set to `CP_UTF8` (otherwise an `ERROR_INVALID_FLAGS` occurs).
7882

7983
> [!NOTE]
8084
> `CP_ACP` equates to `CP_UTF8` only if running on Windows Version 1903 (May 2019 Update) or above and the ActiveCodePage property described above is set to UTF-8. Otherwise, it honors the legacy system code page. We recommend using `CP_UTF8` explicitly.

0 commit comments

Comments
 (0)