Sapient Company Programming

MediaPlayer mediaPlayer = MediaPlayer.create(context, R.raw.sound_file_1);
mediaPlayer.start();
In this line of code, Which function has to be mentioned to start the mediaPlayer?

1) prepare()
2) looper()
3) none of the above

Read Solution (Total 1)

Sapient Other Question

Which attribute should be mentioned in AndroidManifest.xml file to avoid using external spearkers of a device?

1) AUDIO_NOISY
2) AUDIO_BECOMING_NOISY
3) Both of the above
4) None of the above
What will be the output of the following code?


1) runs successfully
2) compile time error
3) runtime error
4) none of the above