Difference between revisions of "Trigger: Call Incoming"

m
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
===<p><b>About</b></p>===
+
<pre class="header-style">The Call Incoming trigger fires when a standard phone call is incoming (i.e., the phone is ringing). This allows you to automate actions when receiving calls, such as sending auto-reply messages, or logging call attempts.</pre>
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
This trigger will be fired when an incoming call is received.
 
</pre>
 
* '''''When this trigger is present, you can use more [...]''''' '''''[https://macrodroidforum.com/wiki/index.php/Magic_text#Call_.28Active.2C_Ended.2C_Incoming.2C_Missed.2C_Outgoing.29 magic text]'''''
 
  
==<p><b>Supported configurations</b></p>==
+
''' Options '''
  
=== Select Contact(s) ===
+
* '''Select Contacts''' - Trigger for incoming calls from specific contacts
 +
** Choose from your contacts list
 +
** Includes special options: Any Contact, Non Contact, Unknown Caller
 +
** Option to exclude selected contacts instead of including them
 +
* '''Select Groups''' - Trigger for incoming calls from contacts in specific groups
 +
** Choose one or more contact groups (e.g., Favorites, Family, Work)
 +
* '''Specify Number''' - Trigger for incoming calls from a specific phone number
 +
** Enter a phone number or partial number match
 +
** Supports wildcards for partial matching
 +
** Option to exclude the specified number
 +
** Supports regex pattern matching
 +
** Magic text can be used for dynamic numbers
 +
* '''Any Number''' - Trigger for any incoming call regardless of the caller
  
'''''Any Contact'''''
+
''' Special Contact Types '''
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Active call from any contact.
 
</pre>
 
'''''Non Contact'''''
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Call of any No Contact.
 
</pre>
 
'''''Unknown Caller'''''
 
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
 
Call from an unknown contact.
 
</pre>
 
  
=== Select Group(s) ===
+
When selecting contacts, the following special options are available:
 +
* '''Any Contact''' - Triggers for incoming calls from numbers saved in your contacts
 +
* '''Non Contact''' - Triggers for incoming calls from numbers not in your contacts
 +
* '''Unknown Caller''' - Triggers for incoming calls from private/hidden numbers
  
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
''' Magic Text '''
These are contacts that are in one or more groups e.g. (My contacts, Family, Coworkers, Do not disturb friends).
 
</pre>
 
  
=== Select Number ===
+
When this trigger fires, the following value are available via magic text for use in subsequent actions.
  
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
* {call_number}
Please note that dialing USSD codes (e.g. **21.... ) on Android 14+ may need to be followed by a UI Interaction action to click the call button.
+
* {call_name}
You may need a Wait action before the click
+
* {call_groups}
operation to ensure the call screen has finished displaying.
 
</pre>
 
  
=== Any Number ===
+
''' Examples '''
  
<pre style="background-color: #ACC8E5; color: #112A46; border-radius: 10px; padding: 10px;">
+
''Example 1: Increase Ringer for Important Contacts''
Any number, no configuration required.
+
  <pre class="trigger-style">Triggers
</pre>
+
 
 +
Call Incoming (Group: Family)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Volume Change: Ring to 100%</pre>
 +
 
 +
''Example 2: Log Unknown Caller Attempts and Reject Call''
 +
  <pre class="trigger-style">Triggers
 +
 
 +
Call Incoming (Unknown Caller)</pre>
 +
  <pre class="action-style">Actions
 +
 
 +
Write to File: Unknown caller at {hour}:{minute}:{second}
 +
Notification: Incoming call from unknown number
 +
Call Reject</pre>
 +
 
 +
''' Notes '''
 +
 
 +
* This trigger fires when the phone starts ringing, before the call is answered
 +
* The trigger uses a PhoneStateListener to monitor incoming call state
 +
* For actions during an active call, use the Call Active trigger instead
 +
* Contact exclusion allows you to trigger for "all calls except" certain contacts
 +
 
 +
''' Permissions Required '''
 +
 
 +
* '''Read Phone State''' - Required to monitor incoming calls
 +
* '''Read Call Log''' - Required for call information access
 +
* '''Read Contacts''' - Required for contact-based filtering (when using contacts)
 +
 
 +
''' See Also '''
 +
 
 +
* [[Trigger:_Call_Active|Call Active Trigger]]
 +
* [[Trigger:_Call_Ended|Call Ended Trigger]]
 +
* [[Trigger:_Call_Missed|Call Missed Trigger]]
 +
* [[Trigger:_Call_Outgoing|Call Outgoing Trigger]]

Latest revision as of 22:07, 5 January 2026

The Call Incoming trigger fires when a standard phone call is incoming (i.e., the phone is ringing). This allows you to automate actions when receiving calls, such as sending auto-reply messages, or logging call attempts.

Options

  • Select Contacts - Trigger for incoming calls from specific contacts
    • Choose from your contacts list
    • Includes special options: Any Contact, Non Contact, Unknown Caller
    • Option to exclude selected contacts instead of including them
  • Select Groups - Trigger for incoming calls from contacts in specific groups
    • Choose one or more contact groups (e.g., Favorites, Family, Work)
  • Specify Number - Trigger for incoming calls from a specific phone number
    • Enter a phone number or partial number match
    • Supports wildcards for partial matching
    • Option to exclude the specified number
    • Supports regex pattern matching
    • Magic text can be used for dynamic numbers
  • Any Number - Trigger for any incoming call regardless of the caller

Special Contact Types

When selecting contacts, the following special options are available:

  • Any Contact - Triggers for incoming calls from numbers saved in your contacts
  • Non Contact - Triggers for incoming calls from numbers not in your contacts
  • Unknown Caller - Triggers for incoming calls from private/hidden numbers

Magic Text

When this trigger fires, the following value are available via magic text for use in subsequent actions.

  • {call_number}
  • {call_name}
  • {call_groups}

Examples

Example 1: Increase Ringer for Important Contacts

Triggers

Call Incoming (Group: Family)
Actions

Volume Change: Ring to 100%

Example 2: Log Unknown Caller Attempts and Reject Call

Triggers

Call Incoming (Unknown Caller)
Actions

Write to File: Unknown caller at {hour}:{minute}:{second}
Notification: Incoming call from unknown number
Call Reject

Notes

  • This trigger fires when the phone starts ringing, before the call is answered
  • The trigger uses a PhoneStateListener to monitor incoming call state
  • For actions during an active call, use the Call Active trigger instead
  • Contact exclusion allows you to trigger for "all calls except" certain contacts

Permissions Required

  • Read Phone State - Required to monitor incoming calls
  • Read Call Log - Required for call information access
  • Read Contacts - Required for contact-based filtering (when using contacts)

See Also