我如何获得服务计时器为我的视频录制应用程序? [英] How do i get service timer for my video recording application?

查看:172
本文介绍了我如何获得服务计时器为我的视频录制应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨我想服务的定时器,使我的相机,以显示过去(增量值)一个计时器,当视频记录过程以这样的格式0时00分○○秒开始时间?但我不知道如何$ C c在服务活动和上面的函数$,因为它带来了不允许XML内容与我mainActivity这于我而言是一个视频录制的活动更新所经过的时间上一个TextView链接的问题,纠正我,如果我错了,还是有一个变通/解决方案?

Hi guys i wanted a "service" timer which enable my camera to show the elapsed(incremental) time of a timer when the video recording process has started in such a format 00:00:00? But i do not know how to code the above function in a service activity since it poses the problem of not allowing xml content to link with my mainActivity which in my case is a video recording activity to update the elapsed time on a textview, correct me if i'm wrong or is there a work around/solution?

当摄像机退出并返回该服务还是应该相应地记录以来启动的时间和更新的TextView ...有人可以帮助我在这个问题上我是比较新的到Android / Java编程?

And when the camera exits and returns the service should still keep track of the time since started and update the textview accordingly... Can someone help me on this matter i'm rather new to android/java programming?

这是我已经尝试了到目前为止我mainActivity它执行记录和显示计时器的更新经过时间。

This is what i have tried out so far for my mainActivity which performs the recording and display the updated elapsed time of the timer..

推荐答案

有可能是一个更好的答案,但你可以只获得了当年开始录制,并记住它。目前还不清楚是什么拥有TextView的,但不管用什么方法可以从当前时间减去开始时间更新。您也可以通过该服务的回调处理程序,它可以用来发送更新报文。

There may be a better answer, but you could just obtain the time when the recording starts and remember it. It's not clear what owns the textview, but whatever does could update it from the current time by subtracting the start time. You can also pass the service a callback handler which it could use to send you update messages.

这篇关于我如何获得服务计时器为我的视频录制应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆