伙计们正试图在正在播放的音频的特定时刻执行一些操作,getCurrentPosition()
但在那一刻没有执行。这是代码:
public class Sound_image_comboActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MediaPlayer player = MediaPlayer.create(this, R.raw.start);
player.start();
while(player.getCurrentPosition()==5671){
setContentView(R.layout.main2);
}
}
}
提前致谢..!