title: MediaPlayer is null on a single device
body: <p>I've got an app published in the Play Store which rings in some circunstances. Well, I've got a user who can't use the app because it breaks when it should sound. I'm receiving the error in the Developer site, and it's a nullpointerexception.</p>
  
  <p>It only happens to a single user, it's very strange. </p>
  
  <pre><code>private MediaPlayer getMediaPlayer() {
      Uri alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
      if (alert == null) {
          alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
          if (alert == null) {
              alert = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_RINGTONE);
          }
      }
      if (alert != null) {
          return MediaPlayer.create(getApplicationContext(), alert);
      } else {
          return MediaPlayer.create(getApplicationContext(),R.raw.android_notification);
      }
  }
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      player = getMediaPlayer();
  }
  
  private void sound() {
  if (player == null) {
          player = getMediaPlayer();
      }
      if (!player.isPlaying()) {
          player.setLooping(true);
          player.start();
          totalSound++;
      }
  ....
  }
  </code></pre>
  
  <p>When it arrives to player.isPlaying() always throws a nullpointerexception on a single device, and I don't know why. It's a Samsung Galaxy 7 Edge, Android 7.0. </p>
  
  <p>Am I doing something wrong? </p>
  
  <p>Thanks!</p>