开发者

Play sound and start vibration on animation repeat

I want to repeat sound and vibration with the repeat of an animation. I've cr开发者_JAVA技巧eated a mediaplayer object and starting it in onAnimationRepeat

public void onAnimationRepeat(Animation animation) {
    // TODO Auto-generated method stub
            mpDot.start();
    vibrator.vibrate(40L);


}

But nothing is happening. Neither the sound is repeating nor the vibration also onAnimationStart I've called mpDot.start() too... So whenever animation is started sound also starts and stops with it. But it doesn't repeat. Why?

Can anybody help.


I'm having the same problem, i think they have a bug or something, thats what has been posted here: http://code.google.com/p/android/issues/detail?id=13397

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜