Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
mp3 via QMediaPlayer on Androis based XPeria Z2
Flaming Moe last edited by
i try to play a mp3 on an Android based XPeria Z2.
Code is very simple
int main(int argc, char *argv)
QApplication a(argc, argv);
QMediaPlayer* player = new QMediaPlayer; // ... //player->setMedia(QUrl::fromLocalFile("C:/WithASpirit.mp3")); player->setMedia(QUrl::fromLocalFile("Music/Adiemus.mp3")); player->setVolume(100); player->play(); w.show(); return a.exec();
On Desktop Win7 PC is works fine.
When deploying it to the Smartphone i get a
E/MediaPlayer-JNI(11261): QCMediaPlayer mediaplayer NOT present
D/Qt MediaPlayer(11261): null
note. I guess it relates to the documentation saying
"The compressed audio formats supported does depend on the operating system environment, and also what media plugins the user may have installed."
I´m not deep enough in the material to figure out my self what to do.
Has someone a hint?