• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

It is possible to get a splash to appear without a blank screen for several seconds?

Explorer ,
Dec 13, 2010 Dec 13, 2010

Copy link to clipboard

Copied

Hi Guys

I've got a game where the final .apk file size is around 6MB and it was taking anywhere from 10 to 25 seconds to load after initial installation with the user seeing nothing but a blank screen. In fact Android sometimes complained that game was taking to long and asked if I want to force close it !

I've tried adding a very small splash .swf (less than 4KB !) which then loads the main swf and images but the loading time is still around 10 seconds ! (if the user has the game in memory it does load immediately so that's something!)

So my questions are

(A) Is the android Air runtime loading the whole .apk file before displaying anything onscreen ?

(B) Is it possible to get large (5 to 10 MB) AIr apps (AS3 not Flex) to load with a splash screen appearing immediately? if so what's the basic technique

(C) is it possible for one APK to call another apk

Thanks in advance guys

Opps - I should also say that the same game on the iPhone and on a PC has a splash appearing straight away

TOPICS
Development

Views

9.7K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 13, 2010 Dec 13, 2010

Copy link to clipboard

Copied

Hi Guys

I've managed to answer my own question ! 🙂

Yes its possible to get a splash to appear straight away (well within one to 2 seconds which is close enough) but

(a) You have to create a small splash .SWF which loads your main .SWF (OK so that's fairly obvious but a "Default.PNG" splash screen facility as per the iPhone packager and FLEX projects is what you might expect)

(b) Your splash .SWF must embed the splash image. If you try to dynamically load an image nothing will appear until the whole of the APK file is loaded ( and presumably initialised). That was what I was doing wrong.

(c) Funnily enough sounds play straight away so any start up sounds can stay in the main SWF but I would move them to the splash .SWf as well because that seems like an anomaly that might get "fixed" by Adobe later.

Regards

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Dec 14, 2010 Dec 14, 2010

Copy link to clipboard

Copied

Nice. Thanks for sharing! If you have time, could you add your solution to the AIR cookbook?

http://cookbooks.adobe.com/air

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 28, 2011 Jan 28, 2011

Copy link to clipboard

Copied

Sorry been really busy. I'll try to add something in the next couple of weeks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 15, 2013 Jul 15, 2013

Copy link to clipboard

Copied

Hi,

I want to add a Splash Screen to my first Android App too. I developed it using Flash CC on a Mac. I´ve seen your description, but I don´t understand how to make ONE .apk out of my splash.swf (or .apk) and the Main.swf? Can you or someone show me please how to do this? At the momnet I´ve got two .apk or .swf files and I do not know how to handle this.

A short reply would be great!

Best regards and thank you in advance

Jan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2013 Jul 15, 2013

Copy link to clipboard

Copied

Hi

Once you'vbe created the splash and the separate main app SWF then you package them into a single APK via something like -

adt.bat -package -target apk-captive-runtime -storetype pkcs12 -keystore %1 -storepass %2 "MyApp.apk"  "App.xml" "myAppSplash.swf"   "MyMainApp.swf"  "Icons" -extdir

Hope this helps

Metaboy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2013 Jul 15, 2013

Copy link to clipboard

Copied

Hi

You can view the source for a splash screen here on my blog*  - http://letschattech.com/?p=9

Metaboy

* sorry don't update it much

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 15, 2013 Jul 15, 2013

Copy link to clipboard

Copied

Hi Metaboy,

thanks a lot for your help!! I´ll try this too!

I just found this one here: http://swfhead.com/blog/?p=817 Some minutes ago I tried it out and it works - not perfect but I can see my splash Screen about 2 seconds after the App was launched. Not perfect, but better than the 8-15 seconds Black screen I had before

How is it with your .swf Preloader? Is it shown immediatelly or is there a black screen for 1-2 seconds too?

---

Additional question - can you tell me how to use this Google RSA-Key for my Flash CC Android App?

Best regards and THANK YOU!!

Jan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2013 Jul 15, 2013

Copy link to clipboard

Copied

Hi

My splash should appear quicker as the image is embedded but its difficult to say as it depends on the size of the embedde image.

Note that my solution waits until the app has actually loaded before removing the splash screen. However the other solution has some scaling options.

I can't help regarding the RSA key as I don't use a Mac for AIR development

M

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 16, 2013 Jul 16, 2013

Copy link to clipboard

Copied

LATEST

Hi Metaboy,

I rebuilt your preloader and want to test it now. But I still don't know how to make one apk out of two. As I said I am working on a Mac. Do I have to use your command line:

adt.bat -package -target apk-captive-runtime -storetype pkcs12 -keystore %1 -storepass %2 "MyApp.apk"  "App.xml" "myAppSplash.swf"   "MyMainApp.swf"  "Icons" -extdir

in the Terminal (of OSX) or what am I supposed to do with it?

Concerning the RSA Key - how do you get this key into your App on your Windos PC? Do you have a link or so for me? Maybe it will work somehow on a Mac too

Best regards and Thank you!!

Jan

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines