开发者

android how to know ringtone length

开发者 https://www.devze.com 2023-02-16 00:39 出处:网络
I\'m working on a sample code same as http://developer.android.com/guide/topics/media, I\'m successfully playing the ringtone, but I want to know the length of the ringtone(in sec) or atleast a notifi

I'm working on a sample code same as http://developer.android.com/guide/topics/media, I'm successfully playing the ringtone, but I want to know the length of the ringtone(in sec) or atleast a notification after end of the ringtone, so that i have to do some other task after p开发者_如何学Pythonlaying the ringtone.

Thanks nehatha


Put it in a MediaPlayer. You dont have to play it just .prepare() it. Then you can ask MediaPlayer about the duration.

0

精彩评论

暂无评论...
验证码 换一张
取 消