Skip to content

Instantly share code, notes, and snippets.

View mo7ammedmohsen's full-sized avatar

Mohammed Mohsen mo7ammedmohsen

View GitHub Profile
/**
* 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();
@mo7ammedmohsen
mo7ammedmohsen / MainActivity.java
Created March 10, 2022 22:38 — forked from anonymous/MainActivity.java
Activity Lifecycle exercise
package com.example.android.lifecycle;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {