Sorry for posting this again but I think some people who only care about Symbian C++ and don't go to the Qt area might be able to help me so I just reposted here.

I need a way to Play/Pause, forward and rewind the native music player in Symbian as I am creating a music player control app. To do this I have determined that I will either somehow need to communicate with the native player or simulate one the media buttons being pressed. On the communication front I have found but this doesn't seem to work on newer phones, by the way I am targeting Symbian^3. Trying to simulate the buttons have managed to simulate normal buttons using this type of thing, this though unfortunately it seems does not support media keys. Lastly though I have found a working way to listen for these keys through but I cannot figure out how to modify it to simulate these keys being pressed rather than listen for them being pressed.

To try and modify it I have tried using remconcoreapicontroller.



#include <remconinterfaceselector.h>
#include <remconcoreapicontroller.h>
#include <remconcoreapicontrollerobserver.h>

class MediaKeysObserver : public MRemConCoreApiControllerObserver
MediaKeysObserver(QObject *parent = 0);
virtual ~MediaKeysObserver();

CRemConInterfaceSelector *interfaceSelector;
CRemConCoreApiTarget *coreTarget;
CRemConCoreApiController *coreController;



#include "mediakeysobserver.h"

MediaKeysObserver::MediaKeysObserver(QObject *parent) : QObject(parent)
interfaceSelector = CRemConInterfaceSelector::NewL();
coreController = CRemConCoreApiController::NewL(*interfaceSelector, *this);
TRequestStatus aStatus;
TUint aNumRemotes;
coreController->PausePlayFunction(*aStatus, *aNumRemotes, ERemConCoreApiButtonClick);

delete interfaceSelector;

This compiles fine but crashes my thread when I try coreController->PausePlayFunction(*aStatus, *aNumRemotes, ERemConCoreApiButtonClick) which results in these types of errors:

Thread has crashed: Thread 0x971 has panicked. Category: RemConIfSel; Reason: 6
Thread has crashed: Thread 0x972 has panicked. Category: RemConIfSel; Reason: 6
Thread has crashed: Thread 0x973 has panicked. Category: RemConIfSel; Reason: 6

Only the thread UIDs differ every time. Do you have any idea what I am doing wrong or what else I can try to achieve my goal?

Thanks in advance.