Develop offline-capable canvas apps
Mobile users often need to be productive even when they have limited or no connectivity. When you build a canvas app, you can perform these tasks:
- Open Power Apps Mobile and run apps when offline.
- Determine when an app is offline, online, or in a metered connection by using the Connection signal object.
- Use collections and leverage the LoadData and SaveData functions for basic data storage when offline.
Note
- Offline capability for canvas apps is only available while running the apps using the native Power Apps Mobile players on iOS, Android, and Windows.
- Canvas apps running in web browsers can't run offline, even when using a web browser on a mobile device.
- Canvas apps in Teams are limited to 1 MB of data through the LoadData and SaveData functions—useful for a small number of text strings, numbers, and dates. Use of images or other media is inappropriate for this limit. More information: LoadData and SaveData function reference
Examples
Formula | Description | Result |
---|---|---|
SaveData( LocalCache, "MyCache" ) | Save the LocalCache collection to the user's device under the name "MyCache", suitable for LoadData to retrieve later. | Data is saved to the app host under the name "MyCache". |
LoadData( LocalCache, "MyCache" ) | Loads the LocalCache collection from the user's device under the name "MyCache", previously stored with a call to SaveData. | Data is loaded from the app host under the name "MyCache". |
ClearData( "MyCache" ) | Clears the storage under the name "MyCache". Any data stored under this name will no longer be available through LoadData. | Data is removed from the app host under the name "MyCache". |
ClearData() | Clear all storage associated with this app. Data stored by other apps is not affected. | All data is removed from the app |
No comments:
Post a Comment