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

New Developer
Posts: 5
Registered: ‎07-31-2012
My Device: BlackBerry Bold 9900
My Carrier: Excelcomindo

BBM connected application

Hi all, I'd like to ask about how to connect an app to BBM SP,

especially for this part of code:
void RegistrationHandler::continueToMainAppScreen()
//TODO: Your applications main screen would be displayed here:

 I dunno what should I do with "TO DO" part, and then I edit it to this :
void RegistrationHandler::continueToMainAppScreen()
App ();
But unfortunately It fails and leaves this messages:
MAKEFILE_GENERATOR../src/RegistrationHandler.cpp: In member function 'void RegistrationHandler::continueToMainAppScreen()':
../src/RegistrationHandler.cpp:158:11: error: no matching function for call to 'App::App()'
../src/RegistrationHandler.cpp:158:11: note: candidates are:
../src/App.hpp:12:5: note:  App::App(bb::cascades::Application*)
../src/App.hpp:12:5: note:   candidate expects 1 argument, 0 provided
../src/App.hpp:8:7: note:   App::App(const  App&)
../src/App.hpp:8:7: note:   candidate expects 1 argument, 0 provided
 What should I do? My main application use the TabbedPane layout and It absolutely works before I connect it to BBM SP.
FYI, I also compare and try the codes from the sample, It likes this:
void RegistrationHandler::continueToMainAppScreen()
= new NavigationPane;

//Your applications main screen would be displayed here:

Page* initialPage;
= new ProfilePage();
but It does not work to, I think that codes is for NavigationPane-base application while mine is TabbedPane-base.
BlackBerry Development Advisor
Posts: 15,349
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: BBM connected application

Basically you can move the code that displayed your initial screen to that section.  Note that for the build error below it looks like you forgot to import your App class into RegistrationHandler.


Alternatively you can just display your original main screen and perform the BBM Connected process in parallel, removing the user from having to press a Continue button.  The Continue button screen isn't ideal for a real world application, but more of a demo so a developer could use it to view the status messages returned from the registration process.  You could handle these in a more user friendly way in your application.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Posts: 96
Registered: ‎10-06-2012
My Device: Z10
My Carrier: Rogers

Re: BBM connected application

I went through this same issue and MSohm is right, the qml/GUI for the samples is just for the samples...Check out my article on how to use the just the methods to get your BBM registration (and others) set up in your qml app.

Jason I. Carter
Follow me @jasonicarter
Built For BlackBerry - WordsPlus & WordsPlus: Free Edition | word search has never had it so good
www.twocasualcoders.com | never casual on quality
Posts: 82
Registered: ‎01-11-2013
My Device: DevAlphadevice
My Carrier: rim

Dtabase connection code issue

Hi all,


i trying to run sample database creation sample from git hub but  i am getting 2 errors in app.hpp file ie


class App: public QObject    //error this line

    // Classes that inherit from QObject must have the Q_OBJECT macro so
    // the meta-object compiler (MOC) can add supporting code to the application.
  App();//error in this

    // "Q_INVOKABLE" allows these functions to be called from main.qml
    Q_INVOKABLE bool createDatabase();
    Q_INVOKABLE void dropTable();
    Q_INVOKABLE void createTable();
    Q_INVOKABLE void createRecord(const QString &firstName, const QString &lastName);
    Q_INVOKABLE void createTableAsync(); // This is an example of how you make asynchronous calls to the database.

private slots:
    // This is the callback used for executing asynchronous queries.
    void onCreateTableReply(const bb::data:Smiley Very HappyataAccessReply &reply);

    // Helper method to show a alert dialog
    void alert(const QString &message);

    // The connection to the SQL database
    bb::data:Smiley FrustratedqlConnection* m_sqlConnection;


so plz reply with some solution