Android - QCMediaPlayer mediaplayer NOT present - unable to play sound at all
<p>I'm trying to play audio from Url, using the below code:</p>

<pre><code>            String url = "1451739079.mp3";
            MediaPlayer player = new MediaPlayer();
            player.setAudioStreamType(AudioManager.STREAM_MUSIC);
            try {
                player.setDataSource(url);
            }catch (IOException e){
                e.printStackTrace();
            }
            player.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                @Override
                public void onPrepared(MediaPlayer mp) {
                    mp.start();
                }
            });
</code></pre>

<p>But this is not at all working, showing error in logcat as:</p>

<pre><code>   E/MediaPlayer-JNI: QCMediaPlayer mediaplayer NOT present
</code></pre>

<p>I've already visited <a href="https://stackoverflow.com/questions/24501086/why-mediaplayer-throws-not-present-error-when-creating-instance-of-it">this SO post</a>,
but of no help.</p>

<p>Please suggest how to play audio from Url?</p>