Last active
May 19, 2023 05:51
-
-
Save udacityandroid/f4ec40027031ba7de9352465f143c816 to your computer and use it in GitHub Desktop.
Miwok app: Cleaning up MediaPlayer resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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; | |
} | |
} |
carolmiers
commented
Mar 26, 2023
via email
Oh
…On Sun, 26 Mar 2023, 20:55 Edafe Precious, ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
That didn't last long
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/udacityandroid/f4ec40027031ba7de9352465f143c816#gistcomment-4516310>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ67437734XN3PHHOUN6GLW6CGJXBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVAZTKNJYGQYTOOFHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
You got me 👍
what's with this? this is a reaaaally old udacity nanodegree android app
Heh! You're too early !!
Re: udacityandroid/Helper Method - releaseMediaPlayer()
Openclassactions.com--Sent from my Android phone with mail.com Mail. Please excuse my brevity.On 3/26/23, 3:20 PM Manan Kumar ***@***.***> wrote:
@manansood60 commented on this gist.
You got me 👍
—Reply to this email directly, view it on GitHub or unsubscribe.You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS or Android.
Re: udacityandroid/Helper Method - releaseMediaPlayer()
Openclassactions.com--Sent from my Android phone with mail.com Mail. Please excuse my brevity.On 3/26/23, 3:02 PM Carol Miers ***@***.***> wrote:
@carolmiers commented on this gist.
Oh
On Sun, 26 Mar 2023, 20:55 Edafe Precious, ***@***.***> wrote:
***@***.**** commented on this gist.
------------------------------
That didn't last long
—
Reply to this email directly, view it on GitHub
<https://gist.github.com/udacityandroid/f4ec40027031ba7de9352465f143c816#gistcomment-4516310>
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ67437734XN3PHHOUN6GLW6CGJXBFKMF2HI4TJMJ2XIZLTSKBKK5TBNR2WLJDHNFZXJJDOMFWWLK3UNBZGKYLEL52HS4DFQKSXMYLMOVS2I5DSOVS2I3TBNVS3W5DIOJSWCZC7OBQXE5DJMNUXAYLOORPWCY3UNF3GS5DZVRZXKYTKMVRXIX3UPFYGLK2HNFZXIQ3PNVWWK3TUUZ2G64DJMNZZDAVEOR4XAZNEM5UXG5FFOZQWY5LFVAZTKNJYGQYTOOFHORZGSZ3HMVZKMY3SMVQXIZI>
.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>
.
—Reply to this email directly, view it on GitHub or unsubscribe.You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS or Android.
Re: udacityandroid/Helper Method - releaseMediaPlayer()
Openclassactions.com--Sent from my Android phone with mail.com Mail. Please excuse my brevity.On 3/26/23, 2:55 PM Edafe Precious ***@***.***> wrote:
@Presheda commented on this gist.
That didn't last long
—Reply to this email directly, view it on GitHub or unsubscribe.You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS or Android.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment