i want to play sound either using mediaplayer or sound pool. and i want to do something when my sound/music reach some position such as
function void hello(){ // you reach position 1.5 seconds }
mediaplayer.setOnCertainPosition(1500, hello()); // not actual code
currently what i found is create loop function for every xxx millisecond and do
mediaplayer.getCurrentPosition()
from this answer
is there any better code?
note: i found about audiotrack but not sure how it works and how to use it