开发者

Play sound and start vibration on animation repeat

开发者 https://www.devze.com 2023-03-14 01:36 出处:网络
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

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

精彩评论

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

关注公众号