Home > Android, JQTouch, PhoneGap > Creating Splash screen / Start up screen for Android app using phonegap / jqtouch

Creating Splash screen / Start up screen for Android app using phonegap / jqtouch

I’ve recently started working on developing andorid a app using phonegap. I have got my application on andoid phone and I notice that there was black blank screen shows up before showing the main application page. So i have decided to put a splash screen on the app and played in jqtouh but that did not help me.

After lots of searching on the internet I have learned that the changes need to be done the main activity class that inherits from DroidGap and also splash screen support on Android was added in version 0.9.3.
Now here is the simple solution:

1) Create a slash screen with splash.png filename
2) Add splash.png file to drawable-hdpi folder which is under the res folder.
3) the thread super.setIntegerProperty( “splashscreen”, R.drawable.splash ); needed to be added to DefaultActivity.java file in the onCreate method. you should place this thread before “loadURL”. For example:

Here is the method in in the relevant file (src>com.testapp>myapp.java)
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
super.setIntegerProperty("splashscreen", R.drawable.splash);

3) Now run the application.

Hope it works for you also….

Categories: Android, JQTouch, PhoneGap
  1. Mohammed
    October 18, 2011 at 6:05 am

    It works for me….


  2. Usama Javed
    February 9, 2012 at 5:05 am

    i have been trying to make this work but when ever i use the code u have shown , it just crashes saying that resource not found but when i give a second argument in
    it shows the splash screen for 2 second but again crashes

  3. June 18, 2012 at 7:07 am

    Its not work for me.. i have downloaded phonegap 1.2.0, which is obviously later version of 0.9.0, but still when i try to include super.loadUrl(“file:///android_asset/www/index.html” line, it doesn’t appear anything.. can you please help me..

    Thanks in advance

  4. Rempel
    June 19, 2012 at 7:41 pm

    Doesn’t works for me.

    • Mohammed
      June 20, 2012 at 11:21 am

      can u provide what error you are getting?

    • Logesh
      July 3, 2012 at 9:19 am

      replace ur code like this,
      its work for me…:-)

  5. Gourav
    July 3, 2012 at 10:31 pm

    Do we have any option of skipping that black screen before the main application? Thanks.

  6. July 20, 2012 at 3:51 pm

    please follow this:

    1)place a splash screen image into u r project.
    2)goto image properties for that select image rightclick on mouse then it
    will display properties
    3)in that Set Built Auction as Content.
    4)then rename the picture as SplashScreenImage.jpg
    before u can remove the default splash screen image.

    then it will work fine!!!!!!!!!.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: