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
fredoust
Posts: 75
Registered: ‎09-12-2012
My Device: Looking for a BB10 testing device
My Carrier: Developper
Accepted Solution

Increase splashscreen time

Hi all,

Sometimes the splashscreen is shown less than a second, is it possible to increase this time manualy?

 

 

Thanks.

---------
Mobile developer freelance - QtQuick - Cascades - WP7 - Android
My works : http://fdelgado.fr
Please use plain text.
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings

Re: Increase splashscreen time

You could use a full screen ImageView containing your splash screen as your first app screen and then automatically push the real interface after a few seconds. 

 

However you should consider if increasing the user's waiting time is a good idea.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Developer
fredoust
Posts: 75
Registered: ‎09-12-2012
My Device: Looking for a BB10 testing device
My Carrier: Developper

Re: Increase splashscreen time

Yes I thought about this solution but I was wondering if there is a I miss something or not.

 

I agree with you about the user's waiting time but my client would like to show his splash 3s, and it's true that sometimes the splash is visible only few milliseconds and we can't see anything.

 

Thanks

---------
Mobile developer freelance - QtQuick - Cascades - WP7 - Android
My works : http://fdelgado.fr
Please use plain text.
Developer
steve_web
Posts: 319
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Increase splashscreen time

I find this thread kind of humorous ;-)

A splash screen has always been added to an app to give the user a visual thing to look at while something slow is loading...

As a user I hate to wait for anything and it would drive me bonkers to know that an extra wait was intentionally added!

I therefore consider it a feature of the BlackBerry 10 OS that your app loads very quickly vs. an issue. ;-)

Hopefully users getting into your app quicker is a better feature than stalling them to view some artwork.

PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings

Re: Increase splashscreen time

It is not configurable so if you really really (can't stress this enough) want this behaviour you'll have to do it as I suggested.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Developer
RileyGB
Posts: 282
Registered: ‎08-06-2010
My Device: Z10

Re: Increase splashscreen time

[ Edited ]

This is possible through the use of a timer.

 

In your app.h file add:

 

public slots:
void startApp();

private: QTimer* splashTimer;

 

In your app.cpp file add: 

MyApp::MyApp() : QObject(), splashTimer(new QTimer(this)) {

	// Connect timer to start app slot
	connect(splashTimer, SIGNAL(timeout()), this, SLOT(startApp()));

	// Set timer properties
	splashTimer->setInterval(3000);
	splashTimer->setSingleShot(true);
	
	// Start timer
	splashTimer->start();

}


void MyApp::startApp() {

	// Create a QMLDocument and load it, using build patterns.
	mQmlDocument = QmlDocument::create("asset:///main.qml");
	mQmlDocument->setParent(this);

	if (!mQmlDocument->hasErrors()) {
		// The application navigationPane is created from QML.
		TabbedPane *tabs = mQmlDocument->createRootObject<TabbedPane>();

		if (tabs) {
			// Set the main application scene to NavigationPane.
			Application::instance()->setScene(tabs);
		}
	}

}

 

This will delay the creation of your app by 3 seconds and let the splash screen show for longer. Since your app won't instatiate immediately, I'd recommend perhaps changing the interval to 2500ms.



Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Please use plain text.
Developer
RileyGB
Posts: 282
Registered: ‎08-06-2010
My Device: Z10

Re: Increase splashscreen time

There are good use cases for showing a splash screen longer. For example, some apps require a disclaimer to be shown for a period of time.


Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Please use plain text.
Developer
bcs925
Posts: 262
Registered: ‎07-13-2012
My Device: PlayBook, DA B, DA C, LE Z10 #102, Q10, Z30
My Carrier: T-Mobile

Re: Increase splashscreen time


searingmedia wrote:
There are good use cases for showing a splash screen longer. For example, some apps require a disclaimer to be shown for a period of time.

In that case use a toast to show the disclaimer onCreationCompleted

---
Check out my BB10 Cascades Coding site: BBcascades.com & Cascades Blog: bbcascadescode.tumblr.com

My Built for BlackBerry app: The Dive Plan
Please use plain text.
Developer
RileyGB
Posts: 282
Registered: ‎08-06-2010
My Device: Z10

Re: Increase splashscreen time

Having implemented both in different apps, I would argue that a toast is more disruptive to the user experience than a slightly longer splash screen.


Follow me on twitter @RileyGB - https://twitter.com/RileyGB
View my BB10 OpenSource projects - https://github.com/RileyGB/BlackBerry10-Samples
Please use plain text.
Developer
dridk
Posts: 91
Registered: ‎09-25-2012
My Device: bb10 alpha
My Carrier: free

Re: Increase splashscreen time

Strange metaphysics mind connexion... I resolve this point on my app, just today! 

a lover of Qt
Please use plain text.