How to add splash screen to an android app in phonegap

To add a splash screen to your android app in phonegap, you need to make sure of few things.

  1. You are using 0.9.3 or higher version of phonegap.
  2. Add
    1
    super.setIntegerProperty("splashscreen", R.drawable.splash);

    to DefaultActivity.Java (which is your main java file) in the onCreate method just before the
    1
    loadUrl("file///asset_android/www/index.html")
  3. Make sure splash is the name of your file like splash.jpg or splash.png in the appropriate place in the “res” directory.

Deploy your code again and see your splash screen just before the app starts.

Enjoy,
Cheers!!!



Tags: ,
This entry was posted on Wednesday, November 9th, 2011 at 8:44 pm and is filed under Android, Mobile app dev. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “How to add splash screen to an android app in phonegap”

  1. Kimberly

    Cool blog!

  2. graphicmist

    Thanks a lot.

Leave a Reply

Your comment