开发者

android how to know ringtone length

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜