Skip to content

Instantly share code, notes, and snippets.

@udacityandroid
Last active May 19, 2023 05:51
Show Gist options
  • Save udacityandroid/f4ec40027031ba7de9352465f143c816 to your computer and use it in GitHub Desktop.
Save udacityandroid/f4ec40027031ba7de9352465f143c816 to your computer and use it in GitHub Desktop.
Miwok app: Cleaning up MediaPlayer resources
/**
* Clean up the media player by releasing its resources.
*/
private void releaseMediaPlayer() {
// If the media player is not null, then it may be currently playing a sound.
if (mMediaPlayer != null) {
// Regardless of the current state of the media player, release its resources
// because we no longer need it.
mMediaPlayer.release();
// Set the media player back to null. For our code, we've decided that
// setting the media player to null is an easy way to tell that the media player
// is not configured to play an audio file at the moment.
mMediaPlayer = null;
}
}
@mateendev3
Copy link

I am the last one here i think :D

@shashankpandey43
Copy link

I am the last one here i think :D

no you r not

@rishikesh953
Copy link

Last one is me

@Abhay-Hasrani
Copy link

i am last second... no "one can prove me wrong but may be two can lol

@Lalithsha
Copy link

op

@taroon332
Copy link

last one

@DrKira1995
Copy link

NO ONE CAN BEAT ME ... LAST COMMENT

@Thorium09
Copy link

I am Last

Siuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu

@syphaxalili
Copy link

But it's me the winner 🙋🏻‍♂️🙋🏻‍♂️

@JuniiiSays
Copy link

JuniiiSays commented Aug 23, 2022

@syphaxal I'm here after you So technically I'm the new winner here

@yatiksihag01
Copy link

@JuniiiSays Well, not anymore...... HAHAHAHA

@Aayuu
Copy link

Aayuu commented Oct 6, 2022

@qureshiwaqas Me who is last everywhere - (Ah shit! here we go again) o_o

@manansood60
Copy link

Beat Me, the new winner ✌

@Presheda
Copy link

That didn't last long

@manansood60
Copy link

You got me 👍

@victorcocuz
Copy link

what's with this? this is a reaaaally old udacity nanodegree android app

@JonathanSum
Copy link

JonathanSum commented Apr 1, 2023

image
Time to celebrate🥳🎉🎊🪅

@Vipxpert
Copy link

Heh! You're too early !!

@slxny
Copy link

slxny commented May 19, 2023 via email

@slxny
Copy link

slxny commented May 19, 2023 via email

@slxny
Copy link

slxny commented May 19, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment