App with Push notification

App with Push notification

BY 31 May 2013 General Support
​I want my application to support Push Notifications and I have used the following code in my application
PushMainForm.cpp

void
PushMainForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId)
{
SceneManager* pSceneManager = SceneManager::GetInstance();
AppAssert(pSceneManager);
switch(actionId)
{
case ID_BUTTON_SUBMIT:
PushListener* pPushListener = new PushListener();
PushManager* pPushManager = new PushManager();
pPushManager->Construct(*pPushListener, *pPushListener);
RequestId reqId;
result r;
r = pPushManager->RegisterPushService(reqId);
break;

default:
break;

}
}

PushMainForm.h

#include <FMessaging.h>
class PushMainForm
: public Tizen::Ui::Controls::Form
, public Tizen::Ui::IActionEventListener
, public Tizen::Ui::Controls::IFormBackEventListener
, public Tizen::Ui::Scenes::ISceneEventListener
, public Tizen::Base::Runtime::IEventListener
, public Tizen::Messaging::IPushManagerListener
, public Tizen::Messaging::IPushEventListener
, public Tizen::Messaging::PushManager

When I build this project am getting error in FormFactory.cpp in the line

PushMainForm* pForm = new PushMainForm();

and the Error is allocating an object of abstract class type ‘PushMainForm’. What is the problem ?

Written by