Do you find yourself annoyed having to manually add someone as a contact after receiving a phone call from them? Would you rather be prompted with the option to add them as a contact before you fumble going through the proper menus? This short tasker task will do just that for you, using the power of intents.
Prerequisites
Instructions
Here's what your Profile should look like. Now, let's move on to the task itself.
That's it! Let me know if there are any suggestions you would make.
Prerequisites
- OPTIONAL: Snackbar Tasker Plugin to make a neat prompt asking you to add the previous caller as a contact
Instructions
- Click + to create a new Profile and name it "Add Contact" or anything else you want.
- Choose a "State" context, go to "Phone" and select "Call." Set the Type to "Incoming" and leave the Number field blank.
- Back out, and name the task that pops up whatever it is you want.

Here's what your Profile should look like. Now, let's move on to the task itself.
- Task --> If. For the first condition, put %CNAME ~ %CNUM. This checks whether or not the previous caller already has a set name by comparing it to the phone number they called from. If the two match, then that means the contact is not recognized. Press the + icon to create another Condition, and make sure that the two Conditions are linked by an And. For the second Condition, set it to %CNUM !~ 0. This checks to see if the previous caller was an unknown/private number, and if so, you won't be prompted to add them as a contact.
- OPTIONAL: Plugin --> Snackbar Tasker Plugin. Select a "Bottom Sheet". Enter the configuration for the snackbar, and enter a title for the dialog that will pop-up (I put "Add caller as contact?"). Under "Items to appear in sheet separated by ","" put down Yes,No. Under "Commands to be sent separated by "," enter yes,no. Take note that there should be NO space between the comma. For the color name fields, enter the hex name for however you want the snackbar to be themed. When you're done, exit out by pressing the checkmark, then press the back key when you're back inside Tasker.
- System --> Send Intent. Under Action put in android.intent.action.INSERT For Cat, leave it at None. For the Mime Type, type in vnd.android.cursor.dir/raw_contact. Next, for the first Extra field type in phone:[%CNUM] Finally, scroll down to Target and select Activity. If you followed the optional step above to make a snackbar, then under If set the condition to %bs_command ~ yes. This means the intent will only be sent if you select yes when the snackbar pops up after a phone call.
- Task --> End If

That's it! Let me know if there are any suggestions you would make.
Attachments
Last edited: