[Android Apps and Games] Jertlok:
THREAD INDEX:

I. INTRODUCTION

II. EXPLANATION - WHAT DOES THE PROFILE DO?

III. TECHNICAL EXPLANATION

IV. INSTALLATION GUIDE

V. FAQ

VI. THINGS TO DO IN THE FUTURE

Second Post. CHANGELOG

#_____________________________#​

I. INTRODUCTION

I am a fan of Tasker as it offers lot of possibilities and makes life better [emoji14]

I learned how to use Tasker basically from myself but @Rsroms gave me the basic knowledge to use this awesome app!

If you are new to Tasker and you wanna learn how to get started i reccomend @brandall Guide (Link to the thread: [TUT] The Ultimate Noob/Beginners Guide to Tasker )… you will learn how to make basic profiles or even intermediate profiles.

However i have created this thread to show off and explain one of my profiles… this one is called “Answer Machine” and it is a “local” implementation of VoiceMail in Tasker. I hope you find this thread useful ! ;)

II. EXPLANATION - WHAT DOES THIS PROFILE DO?

It’s simple. If a call is not being answered in about 15 seconds (or what you want) i suppose you are not near to the Smartphone so Tasker will automatically answer and play a pre-recorded voice saying for example:

“Record your voice after the *beep*”

When the pre-recorded voice has totally been played Tasker will start to record the caller voice and when the caller closes the call the recording will be saved in a known folder (Voicemail/Recordings).

As i unlock my smartphone a scene will appear where i can see who called me. Here is an example:

Mike - +39 xxx xxx - 20:14 (24 Hour format)

Obviously i will offer the possibility to change:

Time that Tasker has to wait. between the start of the incoming call and Time when it gets answered

The pre-recorded voice

In short now i will write all the actions that will be performed on specific events.

EVENT:

Incoming call

ACTIONS TO PERFORM:

Setting %GotCall to 1

How much time has Tasker to wait? -> Wait x (choose your own wait time) seconds.

Answer call

Wait 500 milliseconds

Activate Speakerphone (I have to activate it as there is not the possibility to stream directly into the microphone)

Set the higher volume possible

Play the pre-recorded voice (It will be outputted using the SpeakerPhone)

Wait until the pre-recorded voice message finishes (I have made a recording of 8 seconds so i will set 9 seconds as Tasker's waiting time)

Disable SpeakerPhone (I don’t need anymore the SpeakerPhone)

Now the recording will get started

Write a txt file with: Caller name, Caller number and time (Using append)

EVENT:

Call ended

ACTION TO PERFORM:

Stop recording

I do not need nothing else for the “Core” of the voicemail. Now i have to write a summary for the event “Screen Unlocked”... a simple event that occurs when the Screen gets unlocked.

EVENT:

Screen Unlocked

ACTIONS TO PERFORM:

Check if %GotCall does not match to 0

(If the condition above is verified then do..) Read The Txt File and load it on %Read variable

Show scene (A scene that allows to see who called you)

Set back %GotCall to 0

III. TECHNICAL EXPLANATION

This project consists of:

1 State “Incoming Call” with: “Voicemail Enter” (enter task) and “Voicemail” (exit task)

1 Event “Screen Unlocked” with “Gotten Call” as task

Now i will try to explain detailed as possible the whole project.

INCOMING CALL (State):

It is a profile which gets enabled when there is an incoming call.

The state i have used to check when a call comes is: State -> Phone -> Call and setting the Type to “Incoming”.

Voicemail Enter (Task):

​

What i have used is simple and to get everything working i did not use nothing else than Tasker!

As you can see in the Screenshot there are 11 actions.. in border i will write the right name of the action so you can learn what it does:

Variable Set - Create and set to 1 a variable called “%GotCall”. This matter that i’ve got a call and it is useful for next steps

Wait - Setted to 15 seconds by default. This is the time that Tasker has to wait before answer the call … so set it as you want.

Take call - Just a simple action. It answers to the call

Wait - Already explained. In this case i have setted it to 500 milliseconds i need it to activate the SpekerPhone.. we have to consider some Phone latencies.

Speakerphone - Simple action. It allows to turn on or off the Speakerphone :’)

In-Call Volume - Is it necessary to explain? It adjust the in-call Volume [emoji14]. I need it because as i have explained before there is not the possibility to stream a pre-recorded voice directly.

Music Play - It allows to play a music file… or even a recorded message [emoji14]. We have to set the Stream to “Call” and in File the message we want to play :)

Wait - We will set how many second lasts the Message :). If the recorded message is long 6 seconds set this action to 6 seconds and 500 milliseconds.

Speakerphone - Let’s set the speakerphone off as we do not need it anymore

Record Audio - It allows to start recording a call. We can set a specific name… I have setted it to Voicemail/Recordings/%CNAME - %CNUM - %TIME -> where %CNAME stands for “Caller Name”, %CNUM for “Caller Number” and %TIME for “Time” [emoji14]

Write File - It allows to create and write inside a TXT file. I have used it to create something like a log useful for the next steps (I will show this Txt file on the Event “Screen Unlocked”)

Voicemail Exit (Task):

As you can see this task is made just by one fundamental action “Record Audio Stop”.

This action allows to stop the Call Recording triggered before. If you do not add this action Tasker will continue to record NOTHING ! :)

Display Unlocked (Event):

This event gets triggered when you unlock the smartphone and i will use it to show with a simple Scene (Also made with Tasker) the Log previously made using the function “Write File”.

So what i did is to create a profile using Event -> Display -> Display Unlocked and i have attached to it a simple task that i have called “GottenCall”.

GottenCall (Task):

GottenCall is a task made up of 4 simple action. Let’s take a look of what they do :)

If - It allows to check a condition. I have used it to check if %GotCall differs from 0.. if so means that i’ve got a call! :)

Read File - Simple action that allows to load a whole Txt file inside a variable. The parameters that you have to set are two: File (Which is destination folder) and To var (Which is the Variable you wanna use for loading the Txt file)

Show Scene - This action shows a scene previously made. I have also changed Display As to Activity, Full Window.

Reset

Voicemail Graphic (Scene):

As i said before i have also made a Scene that looks like this screeshot:

​

I have used a simple Text Area setting as Text (source) the variable %Read and a simple button with onTap action -> Destroy Scene - An action that closes the Scene.

IV. INSTALLATION GUIDE

Requirements:

Android 2.3+

[/B][/COLOR]

Tasker (Make sure to have the latest version)

Did you find problems during the installation? Check my Tutorial on YouTube...everything will go right! ;)VoiceMail Project Installation Video Tutorial!​

Step by step guide:

Download the project from the thread (you can find it below)

Now open Tasker, this screen will appear

​

Click on the button Menu and open “Preferences”

Uncheck the Beginner Mode -> This will allow you to import Projects

Go on the main screen of Tasker and click on the Home button

Click on “Import” and go into the folder where you have VoiceMail.prj.xml -> If you have downloaded it using your Smartphone then it is located inside the "Download" folder

As they get imported deactivate them using the toggle available:

​

Open Es File Explorer and create 3 folders on the root:

-Voicemail

-Voicemail/Recordings

-Voicemail/Speech

Now record your own Message using a normal recording App -> I have used the Preinstalled App inside my Note 4

As you have finished to record move the recorded voice to the folder Voicemail/Speech

Open Tasker and go to the “Task” tab

​

Open “VoicemailEnter” and then tap on the action number 7. Here you have select your recording. To select the recording click on the magnifier lens and browse to Voicemail/Speech and click on the pre-recorded file! Once you have selected it tap on the top-left corner (As you are returning back).

Go back and open action number 8. Here you have to set how much time is long your pre-recorded voice. So set down Seconds the right time

Go on the main screen of tasker (Profiles) and activate back all my profiles ! :)

All done, test it and let me know how it works ! :D

V. FAQ

Here you can find the frequently asked questions.

Q: Why Tasker doesn't answer the call?

A: Tasker allows to answer Call using a simple action called "Take call" this one doesn't work on Lollipop and in some others devices. If you are running Lollipop you will not have this problem as i perform a Android Version check... if you have a lower Android version than make sure you grant all the permission needed to tasker. If the problem persists:

Enter inside the task "VoiceMailEnterKK&Lower"

.Delete the task number 3

Add a new action Code -> Run Shell and inside Command put: send keyevent 79

Move this action down the 2nd one.

Q: I have Miui and the call doesn't get answered.

A:

VI. THINGS TO DO IN THE FUTURE

Try to find a workaround for Android 5+ -> FOUND !!!

Improve User Interface on Screen Unlocked

Try to implements something to directly stream inside microphone

I hope you liked my thread… any advice are welcome.

Don’t forget to give me a thumb up :good: if you liked my work :cool:​

-