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
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
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
Copy link to clipboard
Copied
Sorry been really busy. I'll try to add something in the next couple of weeks.
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
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
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
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
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
Copy link to clipboard
Copied
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