Android and splash screen

2,029 views
Skip to first unread message

Ade Goddard

unread,
Nov 9, 2010, 11:14:13 AM11/9/10
to phonegap
Hi

Wondered if someone could shed any light on why my splash screen doesn't seem to appear on android.

I have replaced the placeholder pngs for icon and splash in the 3 directories in /res. The icon works fine however when I load the app in emulator I just get a white screen as the app loads in. I am using the latest build of Phonegap 9.2.

any help would be appreciated.

ade

TomED

unread,
Nov 9, 2010, 11:16:12 AM11/9/10
to phonegap
Would be interested in hearing about this too!

Bryan Zhao

unread,
Dec 2, 2010, 8:57:29 AM12/2/10
to phonegap
I'm in the same trouble. Pls tell me if u found the solution.
Thanks.

Ade Goddard

unread,
Dec 3, 2010, 7:43:09 AM12/3/10
to Bryan Zhao, phonegap
sadly not. i have just started to relook at it now but having no joy yet

2010/12/2 Bryan Zhao <zhaoz...@gmail.com>
--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com

Dave Johnson

unread,
Dec 4, 2010, 10:44:13 AM12/4/10
to Ade Goddard, Bryan Zhao, phonegap
In your main class that inherits from DroidGap you need to call this:

super.setProperty("splashscreen", R.drawable.splash);

in the onCreate method.

2010/12/3 Ade Goddard <ade.g...@gmail.com>



--
Dave Johnson, 
Co-founder and CTO, Nitobi Software


Bryce Curtis

unread,
Dec 4, 2010, 11:30:00 AM12/4/10
to phonegap
There were issues with overloading setProperty() to handle different
data types, so the type was added to the method name. If
setProperty() is not defined, use
super.setIntegerProperty("splashscreen", R.drawable.splash) instead.

On Dec 4, 9:44 am, Dave Johnson <d...@nitobi.com> wrote:
> In your main class that inherits from DroidGap you need to call this:
>
> super.setProperty("splashscreen", R.drawable.splash);
>
> in the onCreate method.
>
> 2010/12/3 Ade Goddard <ade.godd...@gmail.com>
>
>
>
> > sadly not. i have just started to relook at it now but having no joy yet
>
> > 2010/12/2 Bryan Zhao <zhaozuoy...@gmail.com>
>
> > I'm in the same trouble. Pls tell me if u found the solution.
> >> Thanks.
>
> >> On 11月10日, 上午12时16分, TomED <tom.do...@gmail.com> wrote:
> >> > Would be interested in hearing about this too!
>
> >> > On Nov 9, 4:14 pm, Ade Goddard <ade.godd...@gmail.com> wrote:
>
> >> > > Hi
>
> >> > > Wondered if someone could shed any light on why my splash screen
> >> doesn't
> >> > > seem to appear on android.
>
> >> > > I have replaced the placeholder pngs for icon and splash in the 3
> >> > > directories in /res. The icon works fine however when I load the app
> >> in
> >> > > emulator I just get a white screen as the app loads in. I am using the
> >> > > latest build of Phonegap 9.2.
>
> >> > > any help would be appreciated.
>
> >> > > ade
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "phonegap" group.
> >> To post to this group, send email to phon...@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>
> >> For more options, visit this group at
> >>http://groups.google.com/group/phonegap?hl=en?hl=en
>
> >> For more info on PhoneGap or to download the code go towww.phonegap.com
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "phonegap" group.
> > To post to this group, send email to phon...@googlegroups.com
> > To unsubscribe from this group, send email to
> > phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > For more info on PhoneGap or to download the code go towww.phonegap.com
>

Ade Goddard

unread,
Dec 4, 2010, 12:35:10 PM12/4/10
to Bryce Curtis, phonegap
Thanks will give it a try

Sent from my iPhone

Ade Goddard

unread,
Dec 6, 2010, 6:06:46 AM12/6/10
to Bryce Curtis, phonegap
Hi

Sorry if I am being very slow here but I can't get this to work.

I have tried adding:

 super.setIntegerProperty("splashscreen", R.drawable.splash)

into myActivity class which extends droidgap. Is this the right place? 
I get an error:

Description Resource Path Location Type
The method setIntegerProperty(String, int) is undefined for the type DroidGap myactivity.java

I also tried adding into droidgaps onCreate method but i get a similar error. 

I know nothing about JAVA so apologies if this is really nooboid issue

regards

Ade

Dr. Bob

unread,
Dec 5, 2010, 5:48:46 PM12/5/10
to phonegap
Bryce Curtis Rocks!

adding

super.setIntegerProperty("splashscreen", R.drawable.splash)

to my myApp.java file in src -> com -> phonegap -> myApp directory did
the trick.

I am now a happy man :-)

Thanks!

Bob

On Dec 4, 12:35 pm, Ade Goddard <ade.godd...@gmail.com> wrote:
> Thanks will give it a try
>
> Sent from my iPhone
>

Dr. Bob

unread,
Dec 5, 2010, 5:47:20 PM12/5/10
to phonegap
Bryce Curtis Rocks!

adding

super.setIntegerProperty("splashscreen", R.drawable.splash)

to my myApp.java file in src -> com -> phonegap -> myApp directory did
the trick!

I am now a happy man :-)

Thanks!

Bob

Adrian Goddard

unread,
Dec 6, 2010, 2:40:59 PM12/6/10
to Dr. Bob, phonegap
aha thats where it goes:)

Thank you Bob and thank you Bryce!!!!

:)

Ade Goddard

unread,
Dec 7, 2010, 4:37:16 AM12/7/10
to Dr. Bob, phonegap
Hi 

Ok i am having no joy with this:(

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


I get an error saying:

The method setIntegerProperty(String, int) is undefined for the type DroidGap


any ideas?

regards

ade

Dr. Bob

unread,
Dec 7, 2010, 1:48:46 PM12/7/10
to phonegap
Try placing

super.setIntegerProperty("splashscreen", R.drawable.splash);

BEFORE

super.loadUrl("file:///android_asset/www/index.html");

Bob

On Dec 7, 4:37 am, Ade Goddard <ade.godd...@gmail.com> wrote:
> Hi
>
> Ok i am having no joy with this:(
>
> Here is the method in in the relevant file (src>com.testapp>myapp.java)
> /** Called when the activity is first created. */
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> super.loadUrl("file:///android_asset/www/index.html");
> super.setIntegerProperty("splashscreen", R.drawable.splash);
> }
>
> I get an error saying:
>
> The method setIntegerProperty(String, int) is undefined for the
> type DroidGap
>
> any ideas?
>
> regards
>
> ade
>
> > <phonegap%2Bunsu...@googlegroups.com<phonegap%252Buns...@googlegroups.com>
>
> > >>>>> For more options, visit this group at
> > >>>>>http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > >>>>> For more info on PhoneGap or to download the code go
> > towww.phonegap.com
>
> > >>>> --
> > >>>> You received this message because you are subscribed to the Google
> > >>>> Groups "phonegap" group.
> > >>>> To post to this group, send email to phon...@googlegroups.com
> > >>>> To unsubscribe from this group, send email to
> > >>>> phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>
> > <phonegap%2Bunsu...@googlegroups.com<phonegap%252Buns...@googlegroups.com>
>
> > >>>> For more options, visit this group at
> > >>>>http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > >>>> For more info on PhoneGap or to download the code go
> > towww.phonegap.com
>
> > >>> --
> > >>> Dave Johnson,
> > >>> Co-founder and CTO, Nitobi Software
>
> > >>> Office: +1 (604) 685-9287
> > >>> Toll-Free: 1-866-632-2777
> > >>> Cell: +1 (604) 340-9227
>
> > >>>www.nitobi.com
> > >>> twitter.com/davejohnson
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "phonegap" group.
> > > To post to this group, send email to phon...@googlegroups.com
> > > To unsubscribe from this group, send email to

Ade Goddard

unread,
Dec 8, 2010, 4:24:16 AM12/8/10
to Dr. Bob, phonegap
tried this..... still get error

The method setIntegerProperty(String, int) is undefined for the type DroidGap myactivity.java

any ideas?:|

ade


2010/12/7 Dr. Bob <drbob...@gmail.com>

Bryce Curtis

unread,
Dec 8, 2010, 9:37:43 AM12/8/10
to phonegap
Ade,

You have to use version 0.9.3, which is still being developed and
available only from github. It hasn't been released yet, but should
be in the next few days. The feature you are trying to use was added
on 11/21. See commit https://github.com/phonegap/phonegap-android/commit/e3ebfea06407904a6efbc6b66842b205736078df.

Regards,
Bryce

On Dec 8, 3:24 am, Ade Goddard <ade.godd...@gmail.com> wrote:
> tried this..... still get error
>
> The method setIntegerProperty(String, int) is undefined for the type
> DroidGap myactivity.java
>
> any ideas?:|
>
> ade
>
> 2010/12/7 Dr. Bob <drbobbai...@gmail.com>
> > > > <phonegap%2Bunsu...@googlegroups.com<phonegap%252Buns...@googlegroups.com>
> > <phonegap%252Buns...@googlegroups.com<phonegap%25252Bun...@googlegroups.com>
>
> > > > >>>>> For more options, visit this group at
> > > > >>>>>http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > > > >>>>> For more info on PhoneGap or to download the code go
> > > > towww.phonegap.com
>
> > > > >>>> --
> > > > >>>> You received this message because you are subscribed to the Google
> > > > >>>> Groups "phonegap" group.
> > > > >>>> To post to this group, send email to phon...@googlegroups.com
> > > > >>>> To unsubscribe from this group, send email to
> > > > >>>> phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>
> > <phonegap%2Bunsu...@googlegroups.com<phonegap%252Buns...@googlegroups.com>
>
> > > > <phonegap%2Bunsu...@googlegroups.com<phonegap%252Buns...@googlegroups.com>
> > <phonegap%252Buns...@googlegroups.com<phonegap%25252Bun...@googlegroups.com>
>
> > > > >>>> For more options, visit this group at
> > > > >>>>http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > > > >>>> For more info on PhoneGap or to download the code go
> > > > towww.phonegap.com
>
> > > > >>> --
> > > > >>> Dave Johnson,
> > > > >>> Co-founder and CTO, Nitobi Software
>
> > > > >>> Office: +1 (604) 685-9287
> > > > >>> Toll-Free: 1-866-632-2777
> > > > >>> Cell: +1 (604) 340-9227
>
> > > > >>>www.nitobi.com
> > > > >>> twitter.com/davejohnson
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "phonegap" group.
> > > > > To post to this group, send email to phon...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>

Adrian Goddard

unread,
Dec 8, 2010, 9:45:39 AM12/8/10
to Bryce Curtis, phonegap
ah dam it!

thanks Bryce

great framework by the way!!!!!!!!!

steve1964

unread,
Dec 10, 2010, 7:00:20 AM12/10/10
to phonegap
I need this too, where i can download the up to date phonegap.js and
phonegap.jar for 0.93? I've trouble n building phonegap under windows
starting from here: https://github.com/phonegap/phonegap-android

steve1964

unread,
Dec 10, 2010, 6:55:20 AM12/10/10
to phonegap
I need this too, i've trouble in building phonegap under windows
(https://github.com/phonegap/phonegap-android), where i can download
the phonegap-0.9.3.js and phonegap-0-9-3.jar?
Reply all
Reply to author
Forward
0 new messages