| Line 1: |
Line 1: |
| − | <pre style="background-color: #EEEEEE; color: Black; border-radius: 10px; padding: 10px;"> | + | <pre class="header-style">The Hotspot Enabled/Disabled trigger fires when the WiFi hotspot (tethering) functionality is enabled or disabled on the device. This allows you to automate actions based on hotspot state changes.</pre> |
| − | This trigger will fire when the hotspot functionality is enabled/disabled.
| |
| − | </pre> | |
| | | | |
| − | '''Example Usage'''<br/> | + | ''' Options ''' |
| | | | |
| − | <pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
| + | * '''Hotspot Enabled''': Trigger fires when the WiFi hotspot is turned ON |
| − | Triggers
| + | * '''Hotspot Disabled''': Trigger fires when the WiFi hotspot is turned OFF |
| | | | |
| | + | ''' Examples ''' |
| | | | |
| − | </pre><br>
| + | ''Example 1: Notification When Hotspot Enabled'' |
| − | <pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;"> | + | <pre class="trigger-style">Triggers |
| − | Actions
| |
| | | | |
| | + | Hotspot Enabled</pre> |
| | + | <pre class="action-style">Actions |
| | | | |
| − | </pre><br> | + | Popup Message - Hotspot is now active |
| − | <pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
| + | Set Variable - hotspot_active = true</pre> |
| − | Constrains
| |
| | | | |
| | + | Shows a notification and sets a variable when the hotspot is turned on. |
| | | | |
| − | </pre><br>
| + | ''Example 2: Disable Hotspot After Timeout'' |
| − | <pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;"> | + | <pre class="trigger-style">Triggers |
| − | Local variables
| |
| | | | |
| | + | Hotspot Enabled</pre> |
| | + | <pre class="action-style">Actions |
| | | | |
| − | </pre><br> | + | Wait 30 minutes |
| | + | IF hotspot_active = true |
| | + | Hotspot Configure - Disable |
| | + | Popup Message - Hotspot auto-disabled after 30 minutes |
| | + | END IF</pre> |
| | + | |
| | + | Automatically disables the hotspot after 30 minutes to save battery. |
| | + | |
| | + | ''' Notes ''' |
| | + | |
| | + | * This trigger monitors the "android.net.wifi.WIFI_AP_STATE_CHANGED" broadcast. |
| | + | * The trigger responds to state changes in the WiFi Access Point (hotspot) functionality. |
| | + | * Some devices may require additional permissions or settings for hotspot control. |
| | + | |
| | + | ''' See Also ''' |
| | + | |
| | + | * [[Action:_HotSpot_On/Off|Hotspot On/Off Action]] |
| | + | * [[Constraint:_Wifi_HotSpot_State|Wifi Hotspot Constraint]] |