Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
stardomains
Posts: 186
Registered: ‎12-14-2009
My Device: Not Specified

QML and NotificationGlobalSettings on 10.2

Regarding: http://developer.blackberry.com/native/reference/cascades/bb__platform__notificationglobalsettings.h...

 

What am I doing wrong here. 

 

I have:

 

LIBS += -lbbplatform in pro file.

 

I am using 10.2 SDK and testing on a Q10 running 10.2

 

<permission>access_notify_settings_control</permission> in descripitor source.

 

import bb.platform 1.0 at top of QML file

 

 attachedObjects: [
                      
                      NotificationGlobalSettings{
                          
                          id: notificationsid
                      }
                  ]

 in QML file

 

notificationsid.setMode(NotificationMode.PhoneOnly)

 on a button

 

It doesn't work.

 

Also tried this in my main.cpp:

 

qmlRegisterType<bb::smileytongue:latform::NotificationGlobalSettings>("bb.platform", 1, 0, "NotificationGlobalSettings");

 

and on top of that page: 

 

#include<bb/platform/NotificationMode>

#include<bb/platform/NotificationGlobalSettings>

 

What am I missing?

 

 

 

 

Contributor
nyland
Posts: 19
Registered: ‎02-26-2013
My Device: Z10

Re: QML and NotificationGlobalSettings on 10.2

[ Edited ]

In my case I needed to add:

qmlRegisterUncreatableType<bb::smileytongue:latform::NotificationMode>

and

("bb.platform", 1, 0, "NotificationMode", ""); in the cpp file.