01-07-2013 05:27 AM
Hi there!,
I have a problem developing a BlackBerry 10 app. I am using the Blackbery 10 Alpha Device.
When exiting my app (by swiping up from bottom of screen, and pressing close), the app-icon becomes transparent and I can't click it anymore. The only way to start the app again, is then by restarting the device.
What am I doing wrong?
Cheers,
Thorbjørn
01-07-2013 08:12 AM - edited 01-07-2013 08:27 AM
App icon is transparent if your app is still running. You must have some bug in your destructor or similar. Check all code, which run when app should be destroyed.
01-07-2013 08:17 AM
01-07-2013 06:50 PM - edited 01-07-2013 06:50 PM
I'm also having this problem when closing via the navigator window. However, if I call exit(0) via a button in my app it closes graciously and the icon is opaque. This implies to me that my app isn't receiving the NAVIGATOR_EXIT signal correctly.
My app uses Qt/C++ so I tried reimplementing the closeEvent() function to simply call exit(0). However the transparent behaviour is the same.
Any ideas please?
01-09-2013 05:21 AM
Thanks for the answers!
I am also able to properly exit my app by calling "exit(0)".
The problem is that I don't know what is being run, when I exit by using the close button (seen by swiping up).
Cheers,
Thorbjørn
01-09-2013 05:13 PM
I think this Qt/C++ BB10 example may hold some clues:
https://github.com/spstarr/qt-pictureflow-bb10/blo
It connects the signals lastWindowClosed() and aboutToQuit() to the quit() slot:
app->connect( app, SIGNAL(lastWindowClosed()), app, SLOT(quit()) ); app->connect( app, SIGNAL(aboutToQuit()), app, SLOT(quit()) );
I've tried adding this to my app, but it hasn't yet made a difference - I'm convinced this has something to do with it, so I'm going to try pursuing this route for now.
01-09-2013 06:43 PM
I seem to have worked around the issue by having these two statements as my first two lines of code:
int main(int argc, char **argv)
{
QCoreApplication::addLibraryPath("app/native/lib") ;
QApplication a(argc, argv);
// Attempt to stop app displaying in portrait mode
navigator_set_orientation_mode(NAVIGATOR_LANDSCAPE ,NULL);
navigator_rotation_lock(true);
...
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()) );
a.connect( &a, SIGNAL(aboutToQuit()), &a, SLOT(quit()) );
return a.exec();
}
Not sure if that's all necessary, but it seems to work for now. Only issue is that it now brings back the problem I had with the app displaying in portrait mode as described in the forum post here. But it's an improvement of sorts ...