简体   繁体   English

Sencha Touch获取上次通话时间

[英]Sencha Touch get last call duration

Am working on a sencha touch project there i have a requirement to get last call duration. 我在一个sencha touch项目上工作,我有一个获取上次通话时间的要求。 I have a button in my UI when some one tap on that button they can execute a call, after that event i need to get the call duration to that number. 我的UI中有一个按钮,当某个人点按该按钮可以执行呼叫时,在该事件之后,我需要将通话时间保持为该数字。 I have searched a lot to get any clue but did't find one yet. 我进行了很多搜索以获取任何线索,但尚未找到任何线索。 Please direct me in right direction 请指引我正确的方向

here is my code 这是我的代码

{
            xtype:'button',
            text: 'Phone',
            id:'callMeButton',
            flex:1,
            handler:function(){
               window.open('tel:+'+9496347047);
               // here i would like to get the last duration time for this number. 
            }
}

You can't access call log on some system, like iOs . 您无法在某些系统(例如iOs)上访问呼叫日志。

You can do it on Android, and someone wrote a PhoneGap plugin for that (you won't be able to use it with sencha though). 您可以在Android上执行此操作,并且有人为此编写了一个PhoneGap插件 (尽管您无法在sencha中使用它)。

You can probably get the current time just before the window.open() part and then compare it with the current time when the user come back on your app's screen, but it wouldn't be very accurate neither without problems. 您可能可以获取window.open()部分之前的当前时间,然后将其与用户返回到应用程序屏幕上的当前时间进行比较,但这不会很精确,也不会出现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM