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 http://www.developer.nokia.com/Commu...te_Control_API 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 http://www.developer.nokia.com/Commu...ymbian_C%2B%2B, this though unfortunately it seems does not support media keys. Lastly though I have found a working way to listen for these keys through http://www.developer.nokia.com/Commu...ing_media_keys 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.

mediakeycontroller.h:

#ifndef MEDIAKEYSOBSERVER_H
#define MEDIAKEYSOBSERVER_H

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

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

private:
CRemConInterfaceSelector *interfaceSelector;
CRemConCoreApiTarget *coreTarget;
CRemConCoreApiController *coreController;
};

#endif // MEDIAKEYSOBSERVER_H

mediakeycontroller.cpp:

#include "mediakeysobserver.h"

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

MediaKeysObserver::~MediaKeysObserver()
{
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.