Difference between revisions of "Trigger: Data Connectivity Change"

m
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;">
+
<pre class="header-style">
This trigger will fire when the data connectivity state changes.
+
This trigger will fire when the data connectivity state changes. The device is considered to be connected if it has either a WiFi or mobile data connection.
 +
</pre>
  
The device is considered to be connected if it has either a wifi or mobile data connection.</pre>
+
''' Options '''
<br>
 
'''Example Usage'''<br/>
 
  
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
+
* '''Data Available''' - The trigger fires when data connectivity becomes available (either WiFi or mobile data connects).
Triggers
 
  
 +
* '''No Connection''' - The trigger fires when data connectivity is lost (neither WiFi nor mobile data is connected).
  
</pre><br>
+
''' Examples '''
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
 
Actions
 
  
 +
Example 1: Show notification when connection is lost
  
</pre><br>
+
  <pre class="trigger-style">Triggers
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
 
Constraints
 
  
 +
Data Connectivity Change [No Connection]</pre>
 +
  <pre class="action-style">Actions
  
</pre><br>
+
Notification: Internet connection lost</pre>
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
 
Local variables
 
  
 +
Example 2: Sync data when connection becomes available
  
</pre><br>
+
  <pre class="trigger-style">Triggers
 +
 
 +
Data Connectivity Change [Data Available]</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Run Macro: Sync My Data</pre>
 +
  <pre class="constraint-style">Constraints
 +
 
 +
WiFi Connected</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger monitors the ConnectivityManager for network changes.
 +
* The trigger considers the device connected if either WiFi OR mobile data is active.
 +
* This is different from the WiFi trigger which only monitors WiFi state.
 +
* For more granular control, consider using separate WiFi and Mobile Data triggers.
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Wifi_State_Change|WiFi State Change Trigger]]
 +
* [[Trigger:_Mobile_Service_Status|Mobile Service Status Trigger]]
 +
* [[Constraint:_Mobile_Data_On/Off|Mobile Data On/Off Constraint]]

Latest revision as of 22:35, 5 January 2026

This trigger will fire when the data connectivity state changes. The device is considered to be connected if it has either a WiFi or mobile data connection.

Options

  • Data Available - The trigger fires when data connectivity becomes available (either WiFi or mobile data connects).
  • No Connection - The trigger fires when data connectivity is lost (neither WiFi nor mobile data is connected).

Examples

Example 1: Show notification when connection is lost

Triggers

Data Connectivity Change [No Connection]
Actions

Notification: Internet connection lost

Example 2: Sync data when connection becomes available

Triggers

Data Connectivity Change [Data Available]
Actions

Run Macro: Sync My Data
Constraints

WiFi Connected

Notes

  • This trigger monitors the ConnectivityManager for network changes.
  • The trigger considers the device connected if either WiFi OR mobile data is active.
  • This is different from the WiFi trigger which only monitors WiFi state.
  • For more granular control, consider using separate WiFi and Mobile Data triggers.

See Also