语言

Menu
Sites
Language
App with Push notification
​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 ?

编辑者为: Brock Boland 17 3月, 2014 原因: Paragraph tags added automatically from tizen_format_fix module.

响应

6 回复
Sergey Lagner
The PushMainForm class inherits a number of interfaces. Are you shure that you override all pure virtual methods?
Leo Joseph
Sorry for Very late reply. Struck with work. Yes you are right, I have missed one virtual method.
akshma gandotra

HOw do we know which pure virtual function we have missed?

kimi

Hi,

Just cross check with each interface that has been inherited in the API reference "https://developer.tizen.org/help/index.jsp?topic=%2Forg.tizen.native.apireference%2Findex.html" and make sure all the pure virtual methods are overridden.

 

Kimi.

kimi

Hi,

By checking the console, its possible to get the corresponding class whose virtual methods are not overridden.

 

Kimi.

akshma gandotra

Thankyou so much kimi..