Android获取通话时间的代码

可以的通话开始的时候启动Service 记录当前时间A, 然后stopSelf(); 另外在通话结束的时候再次启动一下Service,再次获得当前时间B, 然后把时间A和B进行比较处理

String time = Long.toString(比较后处理的时间)

然后调用Toast.makeText(this, time, Toast.LENGTH_SHORT).show(); 使之显示出来 ,再stopSelf();

This entry was posted in Technology and tagged , , . Bookmark the permalink. 8,178 views

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>