Detecting a connection state
One of the key things for making your app available offline is the ability to detect whether a network is present or not. First of all, Power Apps can detect the presence of a connection signal using a function that can then be used within the logic of your app:
Connection.Connected
This function will return a Boolean value: true
meaning it is connected and false
meaning it is disconnected.
Power Apps can also determine whether the connection is based on the cellular connection of the device or whether it is using Wi-Fi. If the device is using a mobile network, then it is classed as a Metered
connection:
Connection.Metered
Again, this returns a Boolean value: true
for a metered network or false
for an alternative connection.
Both of these connection states should be considered while developing your app, as you can change the behavior of the app depending on whether the app is online or offline, and you can change the behavior...