10-20-2012 05:24 AM
Hello community.
Is there a way i can make the bbm registration qml appear only the very first time the app is launched?
I tried all the sample apps, and everytime i launch a bbm connected app i get the registration qml with the continue button for the main.qml
If i cant make it never appear again once registration is succesful, how about make it disappear after 2-3 seconds on its own?
Any advice?
10-20-2012 05:39 PM
There are new samples posted to the Community Repo on GitHub.
Check them out. They're great.
https://github.com/blackberry/Cascades-Community-S
Once a user has successfully registered with BBM, the dialog will not appear. Permissions are set once.
![]()
10-20-2012 07:02 PM
i am checking bbmqtprofile bbmptinvite and bbmqtprofileboxsample in my dev alpha and the registration qml page appears every time i open the sample apps.it doesnt ask for registration again. It sais bbm registration succeeded. Press continue and has a buuton beneath the message. This is the part i want to avoid.since once registered how can i hide this procedure.
10-21-2012 12:26 AM
Replace registration.qml with main.qml
You do not need to show registration.qml.
11-12-2012 07:31 PM
11-14-2012 12:31 AM
12-22-2012 10:32 PM
Thanks. The HelloBBM sample is great. Only question I have is if there is no network my app is showing what looks like a system error (see attached). I don't like this error message because I don't control it and don't like the wording. Also, the user doesn't really know I am trying to connect to BBM at this point so they get confused.
Does anyone agree with me on this? Any thoughts.
12-23-2012 12:00 PM
Hi JaredCo, thanks for the comments. The attached image doesn't show up properly so I'm going to guess that the message you're referring to is this...
case RegistrationState::NoDataConnection: m_statusMessage = tr("Check your Internet connection and try again."); m_temporaryError = true; break;
This message is a "system error" of sorts. As you can see the message is hard coded (in the registrationHandler.cpp file) but you can change it. If you don't want to change it here, there's another thing you can do which is prehaps a nicer approach.
See the variable "m_temporaryError" ? This is attached to a Property which is accessible in your QML registration page. Assuming you like how this particular area works, you could create an enum with values that coorespond to different types of errors - for example noDataConnection 1, maxAppsReached 2, pending 3, etc
Then make these values accessible as a Q_Porperty for your QML...Once registration takes place, if you get an error and its property value is 1 aka "noDataConnection" then you can set the message however you'd like in QML.
Or you can just by pass all error by calling finishedRegistration() in all of the cases. This will cause a signal to be emitted that will in turn trigger your "show()" method in the appName.cpp file
Hope that helps
Jason
12-23-2012 12:29 PM
Hi Jason,
Thanks for replying. I had already done what you mentioned to make sure there were no messages generated from the registration.cpp. This seems to be a system message which you could see if you run HelloBBM without wifi from a fresh install (never regsitered before). I've attached the image again so you can see it. Let me know what you think. Thanks.
12-23-2012 01:05 PM
Ah! I see what you mean. I agree it's a system message, similar to trying to open BlackBerry World or Games without internet connection...Never thought about trying to get rid of it, though.
You could try something like...
if ( isInternetAvailable() ) {
do registrationHandler code
} else {
skip registration code
}
This will prevent the message from coming up because it never tries to register if there's no internet connection. But I don't exactly know how to test for internet connection because I don't need to in my app, bbm or scorelooop inform me and then I update the user appropriately (probably not the best approach)