Skip to content

Commit fbb60d0

Browse files
authored
Merge pull request #8902 from MicrosoftDocs/u/anuitz/mobilenative
Optimize for devices documentation
2 parents e1efb95 + 864be13 commit fbb60d0

7 files changed

+151
-1
lines changed

powerapps-docs/maker/TOC.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,6 +1785,12 @@
17851785
href: ../mobile/scan-QR-code.md
17861786
- name: Switch to a different directory in the Power Apps mobile app
17871787
href: ../mobile/tenant-switcher.md
1788+
- name: Optimize canvas app screens for devices
1789+
items:
1790+
- name: Optimize for devices overview (preview)
1791+
href: ../mobile/optimize-for-devices-overview.md
1792+
- name: Optimize for devices controls (preview)
1793+
href: ../mobile/optimize-for-devices-controls.md
17881794
- name: Mobile offline for model-driven apps
17891795
items:
17901796
- name: Mobile offline overview
@@ -2641,4 +2647,4 @@
26412647
- name: Troubleshoot Power Query
26422648
href: /troubleshoot/power-platform/power-apps/troubleshoot-power-query-issues
26432649
- name: Support
2644-
href: https://powerapps.microsoft.com/support/
2650+
href: https://powerapps.microsoft.com/support/
31.2 KB
Loading
12.5 KB
Loading
41.5 KB
Loading
10.3 KB
Loading
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
title: Optimize for devices controls (preview)
3+
description: Learn which controls and properties are supported for device-optimized screens.
4+
author: anuitz
5+
ms.topic: conceptual
6+
ms.custom: canvas
7+
ms.reviewer: sericks
8+
ms.date: 11/14/2023
9+
ms.subservice: canvas-maker
10+
ms.author: anuitz
11+
search.audienceType:
12+
- maker
13+
contributors:
14+
- sericks
15+
- anuitz
16+
---
17+
18+
# Optimize for devices controls (preview)
19+
[This article is prerelease documentation and is subject to change.]
20+
21+
For a screen to be optimized for devices, it must use controls that are supported natively. You can filter the control **Insert** pane to only show device-optimized controls.
22+
23+
:::image type="content" source="media/optimized-for-devices-control-filter.png" alt-text="The Insert pane is filtered to only show controls that are device-optimized.":::
24+
25+
> [!Important]
26+
> - This is a preview feature.
27+
> - Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
28+
29+
## Device-optimized controls
30+
The following controls are available for screens that are optimized for devices. All other controls are currently unsupported.
31+
32+
[**Modern controls**](../maker/canvas-apps/controls/modern-controls/modern-controls-reference.md)
33+
- Button
34+
- Checkbox
35+
- Date picker
36+
- Form
37+
- Text
38+
- Text input
39+
- Toggle
40+
41+
[**Controls**](../maker/canvas-apps/reference-properties.md)
42+
- Add picture
43+
- Barcode reader
44+
- Button
45+
- Camera
46+
- Check box
47+
- Circle
48+
- Container (horizontal and vertical included)
49+
- Form (edit and display)
50+
- Gallery (vertical, horizontal, flexible height)
51+
- Icon (all icons supported)
52+
- Image
53+
- Radio
54+
- Rectangle
55+
- Text input
56+
- Text label
57+
- Timer
58+
59+
## Unsupported controls
60+
61+
If a screen is set to be optimized for devices, but has an unsupported control, an error message in a box is displayed.
62+
63+
:::image type="content" source="media/optimized-for-devices-control-error.png" alt-text="The error that shows when an unsupported control is on a screen set to optimize for devices.":::
64+
65+
## Device-optimized properties
66+
67+
Some properties must be specifically configured to be optimized for devices. For example, consider the [barcode reader](../maker/canvas-apps/controls/control-barcodereader.md) control. The maker can select **Scan Inline** for the **Scanning mode** property. In Power Apps Studio, when this mode is selected, the control displays as a warning box indicating the control only works on mobile devices. On a device, in a screen optimized for devices, the control displays a camera feed to enable barcode scanning.
68+
69+
## Known limitations
70+
71+
Note the following limitations with the optimize for devices feature.
72+
73+
- Only the **Segoe UI** font is supported. If a control is using another font, it displays the Segoe UI font, instead. Due to the differences in fonts, this can result in the control taking up more or less space than expected. We recommend that you use the Segoe UI font for device-optimized screens.
74+
- The **Image** control, when showing an SVG, only supports the fit and stretch image position options. Its default behavior is to fit, if another option is selected. All other image types work as expected for all image positions.
75+
- In the **modern Text** control, the **Semi-bold** and **Medium** font weights aren't supported on Android devices. It displays a regular font weight, instead.
76+
- In the **modern Text input** control, the **Value** property, when set to a Power Fx variable, isn't displayed at first navigation. Instead, it shows the placeholder value until the user navigates away and back to the screen with the **modern Text input** control.
77+
- In the **modern Text input** control, the **OnChange** property is called twice when the control is exited, and then blurred.
78+
- In the **modern Text input** control, the **Validate state** property doesn't display a red border around the control.
79+
- In the **Image** control, the **Image rotation** property isn't supported. The image isn't rotated.
80+
- In the **Dropdown** and **Radio** control, the **Items** property doesn't support references to other controls. Items aren't shown if they're complex values, like references.
81+
- In the **modern Date picker** control, tapping on the control opens a modal with a calendar, instead of allowing users to type into the control directly.
82+
- In the **modern Date picker** control, the **Base palette color** and modern theme aren't applied on Android devices. Instead, it displays as the device's theme color.
83+
- In the **Button**, **Image**, **Label**, and **Icon** controls, the **SetFocus** Power Fx function doesn't support keyboard focus, only accessibility focus (for example, screen reader).
84+
- In **Horizontal and vertical containers**, the **Drop shadow** property isn't supported. Instead, containers display without drop shadow.
85+
- In **Horizontal and vertical containers**, the **Scroll** option only works for a single direction, depending on the **Wrap** property. If **Wrap** is off, the container is scrollable in the primary direction, otherwise it's scrollable in the secondary direction.
86+
- Multiple **Barcode reader** controls on a single screen aren't supported.
87+
- Multiple **Camera** controls on a single screen isn't supported.
88+
- In the **Camera** control, the **Display mode** property of the parent control isn't supported. For example, if the camera control is part of a form that is set to view mode, the camera might still be in edit mode.
89+
- On **Screen**, the **Background image** property isn't supported.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Optimize for devices overview (preview)
3+
description: Learn how to make your canvas app screens optimized for devices.
4+
author: anuitz
5+
ms.topic: conceptual
6+
ms.custom: canvas
7+
ms.reviewer: sericks
8+
ms.date: 11/14/2023
9+
ms.subservice: canvas-maker
10+
ms.author: anuitz
11+
search.audienceType:
12+
- maker
13+
contributors:
14+
- sericks
15+
- anuitz
16+
---
17+
18+
# Optimize for devices overview (preview)
19+
[This article is prerelease documentation and is subject to change.]
20+
21+
_Optimize for devices_ is a feature that changes the way canvas app screens are loaded and displayed for Android and iOS devices to use native UI. This lets makers build stunning native apps for mobile users with device-optimized screens that use native UI elements instead of rendering inside of web view. This feature provides the following benefits:
22+
23+
- Brings modern mobile user experiences and interaction patterns
24+
- Improves performance and reliability
25+
- Integrates device capabilities with maker defined UI
26+
27+
There's no need to rebuild apps as makers can use all the familiar app building elements to create device-optimized experiences, though there are some limitations around which [controls are supported natively today](./optimize-for-devices-controls.md). Apps that are optimized for device work with other mobile features like [offline](./canvas-mobile-offline-overview.md), [push notifications](./power-apps-mobile-notification.md), and [wrap](../maker/common/wrap/overview.md).
28+
29+
> [!Important]
30+
> - This is a preview feature.
31+
> - Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.
32+
33+
## How screens are optimized for devices
34+
35+
For a canvas app running on Power Apps mobile, there are UI elements, their current state, and the related business logic. For example, on screen you might have a button that is currently at position 0, with a width and height of 200 and 40 respectively, and is fill color blue on top of having business logic defined on select with Power Fx that navigates the user to a different screen.
36+
37+
If optimize for devices is off for that screen, the screen loads and the displays in a web view, running similarly to how it would in a desktop's web browser. When optimized for devices is on, each element's current state is passed over to the device where it renders that same element, but using native UI. So now we have a natively rendered, long blue button in the top-left corner. Business logic modifies state or takes actions, which run the same way it did before, meaning when that now natively rendered button is clicked on, the device runs Power Fx and the user is navigated to the specified screen.
38+
39+
What this means is that each [control needs a device-optimized](./optimize-for-devices-controls.md), native equivalent that supports the same properties so it can render the way a maker expects. During preview, there are some [limitations](optimize-for-devices-controls.md#known-limitations) to which controls and properties are supported. This is independent of whether a control is classic or modern, but rather a filter on the list of controls to ones that are device-optimized.
40+
41+
## Enable screens to be device-optimized
42+
43+
There are two steps to enabling a screen to be optimized for devices.
44+
45+
1. The **Optimize for devices** experimental app setting must be turned on.
46+
47+
The setting can be found in **Settings** > **Upcoming features** > **Experimental** tab. Turning on the **Optimize for devices** app setting shows the **Optimize for devices** property on screens.
48+
49+
:::image type="content" source="media/optimized-for-devices-app-setting.png" alt-text="Shows the app setting that enables Optimize for devices.":::
50+
51+
2. On each screen, the **Optimize for devices** property must be set to **On**.
52+
53+
A maker can open the tree view in the left-hand pane and select a screen where the **Optimize for devices** property will be. By setting this property to **On**, the screen will be rendered natively when running on Power Apps mobile in iOS and Android devices.
54+
55+
:::image type="content" source="media/optimized-for-devices-screen-setting.png" alt-text="Shows the screen setting that sets that screen to display natively.":::

0 commit comments

Comments
 (0)