I am writing an application which needs to use MMPXPlaybackUtility class to access the details of the currently played song in the native media player.
Working case: If media player is already open and currently in idle state, then my app works fine(i.e., fetches song details properly).
Not working case: If media player is open and a song is currently being played, then my app doesnt fetch details properly.
If i open my app, when song is already playing, the music player pauses and the ui become unresponsive except back button/options button. Only way to make UI proper is to go back to playlist screen from Now playing screen of music player.
I dont know what is the problem if i create utility object when song is getting played.
Code snippet i used to create utility object is:
iPlaybackUtility = MMPXPlaybackUtility::NewL(KPbModeActivePlayer);
// Add observer
& on exit, i am doing:
Anything else i need to do when creating utility object in order to keep the current song played without disruption when i open my app and to keep the ui of music player clean ??
Need urgent help.