Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why MediaPlayer throws NOT present error when creating instance of it?

When creating an instance of MediaPlayer LogCat shows this error:

QCMediaPlayer mediaplayer NOT present

Why is that and is it normal?

Sample:

package com.example.testapp;  import android.app.Activity; import android.media.MediaPlayer; import android.os.Bundle;    public class MainActivity extends Activity{       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         MediaPlayer mediaPlayer = new MediaPlayer();     } } 
like image 722
antifriz Avatar asked Jul 01 '14 01:07

antifriz


People also ask

What is MediaPlayer in android?

android.media.MediaPlayer. MediaPlayer class can be used to control playback of audio/video files and streams. MediaPlayer is not thread-safe. Creation of and all access to player instances should be on the same thread. If registering callbacks, the thread must have a Looper.

What is Media Player in android explain transitions through the state machine?

Android is providing MediaPlayer class to access built-in mediaplayer services like playing audio,video e.t.c. In order to use MediaPlayer, we have to call a static Method create() of this class. This method returns an instance of MediaPlayer class. Its syntax is as follows − MediaPlayer mediaPlayer = MediaPlayer.


1 Answers

It means your platform does not support QCMediaPlayer. QCMediaPlayer provides extended APIs and interfaces to get and set MPD attributes for DASH protocol in compatible Snapdragon builds. So, this error should not affect on media playing in normal case

Check this sources to find out more details:

QCMediaPlayer.java

like image 74
alexuz Avatar answered Oct 14 '22 00:10

alexuz