Tambahkan durasi hingga saat ini di Kotlin
Date.time.plus(Duration.ofDays(1).toMillis())
FunyinKash
Date.time.plus(Duration.ofDays(1).toMillis())
// for android 10+
val uri = Uri.parse("full/path/to/file\ or /link/to/internet/resource")
var durationTime: Long
MediaPlayer.create(this, uri).also {
durationTime = (it.duration / 1000).toLong()
it.reset()
it.release()
}