How do I use a splash screen?

1 favourites
  • 3 posts
From the Asset Store
A collection of 16 amazing sprite sheet animations for your incredible games
  • Hi!

    How can I set my own splash screen?

    In IOS I got it working.

    For IOS I compile with phonegap and they've got clear instructions on how to add splash screen.

    1. add the following plugin and setting to config.xml

    <plugin name="cordova-plugin-splashscreen" />

    <preference name="SplashScreenDelay" value="Time in ms" />

    2. After that you just replace your "default@2x~universal~anyany.png" and your splash screen shows up instantly when I launch the app. I set loader style to nothing and use a loader layout that's only black because the game loads so fast anyways. IOS is perfect when I do that.

    But whats the procedure for android when your using the build service?

    Replacing the "default@2x~universal~anyany.png" doesn't do anything for android. Should I use the construct 3 splash and somehow replace that image? I can't find it anywhere in my apk though.

    Do I need a third party plugin or something?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well.. I dont know how but maybe something related to this tutorial : scirra.com/tutorials/318/how-to-use-loader-layouts-to-make-custom-loading-screens

    I just hope a nice guy could post an example events in editor start page. So I can learn how to do it right.

  • Thanks.

    I did export to android studio and tried that way. IF I remember correctly there is a long wait before the loader layout shows up on mobile. And people don't have a lot of patience these days. So even a second of delay before any feedback and people think the app is broken or something. :P

    I now have the splash screen show up immediately and can control the delay for it, but there is an annoying white flash after the splash has finished. I think my code is wrong.

    I made a new Java class for the SplashActivity.

    public class SplashActivity extends AppCompatActivity {
    	private static int SPLASH_TIME = 1750; //time in MS the splash stays on the screen.
    
    	(at)Override
    	protected void onCreate(Bundle savedInstanceState) {
    		super.onCreate(savedInstanceState);
    		new Handler().postDelayed(() -> {
    			Intent intent = new Intent(SplashActivity.this, MainActivity.class);
    			startActivity(intent);
    			finish();
    		},SPLASH_TIME);
    	}
    }
    

    Yeah a nice tutorial would be gold!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)