I happen to find that for GSM standard phone, call duration would be created into sql database only if the outgoing call is being answered, or after hanging up if it is not being answered.

So i guess this method is meant for CDMA android phone only. cause we could not detect if outgoing call is offhook by the callee via tasker or sl4a.

Java code would be the solution i think, by monitoring the phone state.

 
 
If you are interested, please follow my profile instruction below and run some test, please further advise me if it is working or any issues. many thanks!
 
 
NB.: to run sqlite 3 command, you must make sure your phone has installed the proper sqlite3 file and you must root your phone first to run sqlite3 command.
 
Tips:
download the sqlite3 file via the links below and renane it as "sqlite3" if it is not, then put it under the phone root directory /system/bin folder, and don't forget to modify the permission for the sqlite3 file to be
rwxr-xr-x
 
android 4.0 or earlier: http://bit.ly/sqlite3
  
 
profile:
context: state-phone-call, type:outgoing
 
task:
 
action 1: script-run shell,
command:
sqlite3 /data/data/com.android.providers.contacts/databases/contacts2.db "select duration from calls where type <= 2 order by date desc limit 1;"
 
use root checked, store result in %VIBRATING 
 
action 2: alert-vibrate, 200ms, if %VIBRATING  ~   1
 
action 3: task-goto, action number 2, if %VIBRATING    !~   1
 
Action 4: task-stop, if %VIBRATING  ~   1

Tasker to detect and vibrate once the ougoing call is being answered的更多相关文章

  1. Tasker to detect application running in background

    We used to be told that tasker is only capable of detecting foreground application, if the app gets ...

  2. Tasker to auto record incoming or outgoing call

    Tasker to auto record incoming or outgoing call most of time, i was thinking of tasker can do the jo ...

  3. Browser detect

    A useful but often overrated JavaScript function is the browser detect. Sometimes you want to give s ...

  4. How to read out WhatsApp messages with Tasker and react on their content in real time

    http://technologyworkroom.blogspot.sg/2013/05/tasker-how-to-read-out-whatsapp.html Tasker can read o ...

  5. Send a WhatsApp Message programatically -- Tasker WhatsTasker

    Here is My code snippet: Uri mUri = Uri.parse("smsto:+9876543210"); Intent mIntent = new I ...

  6. TASKER 手机在有同一个号码的三个未接电话时自动回复短信

    http://tieba.baidu.com/p/3695018030 感谢默默为Tasker吧奉献的人! 配置为>未接来电 任务为>代码>javascriptlet 代码为: va ...

  7. Tasker App Factory

    http://tasker.dinglisch.net/userguide/en/appcreation.html App Creation Introduction Hello World Exam ...

  8. 强烈推荐:Android史上最强大的自定义任务软件Tasker

    强烈推荐:Android史上最强大的自定义任务软件Taskerhttp://bbs.mumayi.com/thread-28387-1-1.html(出处: 木蚂蚁手机乐园) Android上的Tas ...

  9. Microsoft Windows* SDK May 2010 或较新版本(兼容 2010 年 6 月 DirectX SDK)GPU Detect

    原文链接 下载代码样本 特性/描述 日期: 2016 年 5 月 5 日 GPU Detect 是一种简短的示例,演示了检测系统中主要显卡硬件(包括第六代智能英特尔® 酷睿™ 处理器产品家族)的方式. ...

随机推荐

  1. mac搭建lamp环境

    转载:https://www.cnblogs.com/beautiful-code/p/7465320.html

  2. GLOBAL_NAMES参数研究

    最近在配置Stream时,发现必须要把GLOBAL_NAMES参数的指设置为TRUE,具体原因为何不知.但是发现在设置了该参数之后,数据库每天的物化视图刷新出现了问题.之后查明原因,是DBLINK出现 ...

  3. C++之构造函数的继承

    #include<iostream> usingnamespace std; classBase1 { public: Base1()=default; Base1(const strin ...

  4. MySQL学习笔记:少用Null

    在实际编程中,Null容易引起很多问题,例如在Java里NullPointerException猝不及防的空指针异常,因此需要过多的if判断,甚是麻烦. 在MySQL数据库中也要少用Null,尽量保持 ...

  5. 怎么能让json_decode解析带斜杠的字符串

    比如前台一个js object:{  aa: "cc\dd"}$d = '{\"aa\": \"cc\\dd\"}';这时候用 json_d ...

  6. hdu 5137 去掉一个点 使得最短路最大(2014广州现场赛 K题)

    题意:从2~n-1这几个点中任意去掉一个点,使得从1到n的最短路径最大,如果任意去掉一个点1~n无通路输出Inf. Sample Input4 51 2 31 3 71 4 502 3 43 4 23 ...

  7. linux kernel.shmall shemax shemin解释

        Linux X86-64操作系统,Oracle 10g数据库,由8G加到16G,把kernel.shmmax参数改到17179869184(16G)后,发现只要修改sga_max_size和s ...

  8. scala递归实现换零钱算法

    import scala.collection.mutable.ArrayBuffer import scala.util.control.Breaks object Exchange { def d ...

  9. Collabtive 系统 SQL 注入实验(补充)

    SQL Injection:就是通过把SQL命令插入到Web表单递交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行恶意的SQL命令. 具体来说,它是利用现有应用程序,将(恶意)的SQL命令注 ...

  10. qt study2