我正在开发一个android应用程序,其中我正在接听电话 - 日志。我已显示呼叫日志的所有详细信息。 问题是我可以在几秒钟内获得通话时间,但我需要它以hh-mm-ss格式。以hh-mm-ss格式呼叫记录持续时间
这里是下面的代码,我想:
int duration = managedCursor.getColumnIndex(CallLog.Calls.DURATION);
while (managedCursor.moveToNext())
{
String callDuration = managedCursor.getString(duration);
}
任何帮助吗? (http://stackoverflow.com/questions/625433/how-to-convert-milliseconds-to-x-mins-x-seconds-in-java/625624#625624)(http://stackoverflow.com/questions/ 266825/how-to-format-a-duration-in-java-eg-format-hmmss/266970#266970) –
这应该有助于http://stackoverflow.com/questions/6118922/convert-seconds-value-to- hours-minutes-seconds-android-java –
@肯狼:谢谢..它帮助 – LISA