Changes

no edit summary
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 a SIM card is inserted or removed. It monitors the SIM card state to detect physical changes to the device's cellular connectivity.</pre>
This trigger is triggered when a SIM card is inserted/removed.
  −
</pre>
  −
<br>
  −
'''Example Usage'''<br/>
  −
It will emit a sound (previously configured by the user), for this example it will be an alert sound.
  −
<pre style="background-color: #AC2424; color: white; border-radius: 10px; padding: 10px;">
  −
Triggers
     −
SIM removed
+
''' Options '''
</pre><br>
  −
<pre style="background-color: #1665B0; color: white; border-radius: 10px; padding: 10px;">
  −
Actions
     −
Play sound (alert)
+
* '''SIM Inserted''' - The trigger fires when a SIM card is inserted into the device
</pre><br>
+
* '''SIM Removed''' - The trigger fires when a SIM card is removed from the device
<pre style="background-color: green; color: white; border-radius: 10px; padding: 10px;">
  −
Constraints
      +
''' Examples '''
   −
</pre><br>
+
'''Example 1: Anti-theft notification'''
<pre style="background-color: teal; color: white; border-radius: 10px; padding: 10px;">
  −
Local variables
      +
Get notified if someone removes your SIM card:
   −
</pre><br>
+
  <pre class="trigger-style">Triggers
 +
 
 +
SIM Card Change: SIM Removed</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
WiFi: Enable
 +
Send Email: "SIM card removed from device" to your email</pre>
 +
 
 +
'''Example 2: Travel SIM setup'''
 +
 
 +
Automatically configure settings when inserting a travel SIM:
 +
 
 +
  <pre class="trigger-style">Triggers
 +
 
 +
SIM Card Change: SIM Inserted</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Wait: 30 seconds (for SIM to initialize)
 +
Mobile Data: Enable
 +
Data Roaming: Enable
 +
Display Notification: "Travel SIM detected - roaming enabled"</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* The trigger listens for the Android SIM_STATE_CHANGED intent
 +
* There may be a brief delay between physical SIM insertion/removal and the trigger firing while Android processes the change
 +
* On dual-SIM devices, the trigger will fire for either SIM slot
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Roaming_Started/Stopped|Roaming Started/Stopped]]
 +
* [[Trigger:_Airplane_mode_changed|Airplane Mode Changed Trigger]]