Wednesday 23 April 2014

Splash screens in Delphi Android apps

I’ve been meaning to do it for quite a while and I recently started writing up my steps for creating an Android splash screen (as per my CodeRage 8 session). No sooner did I do so that Delphi XE6 launched itself onto the scene, making my write up immediately slightly out of date :-/

Unperturbed, I finished the job off and if you’re interested you can read it here. Hopefully that makes things clearer than the breakneck pace of the video….

I also then did the necessary updates for Delphi 6, taking account of the small changes that I’ve seen in this area. You can read the Delphi XE6 version here.

I’ll hopefully get some more words written onto the Web soon, regarding other Android features not wrapped up by Delphi’s Android FMX implementation, as per some of the other demos from the CodeRage session.

2 comments:

  1. .. "after 3 seconds or the user taps the splash screen": How about sending some command from the delphi app when its loaded to bypass the 3 second timeout?

    ReplyDelete
    Replies
    1. Yeah, I wondered about that as I wrote the words. I'm unsure right now if I actually tried that last year when setting this up.
      I have a suspicion, and I'll need to confirm this, that if you, say, just directly launch the FMX activity from the splash screen, then the splash screen will be replaced by the black screen (which is the FMX default), before eventually having the Delphi form come up when the library has been loaded up by the Java mapping to a native routine in it.
      I think the problem here is that it is difficult to know when the Delphi library has been loaded from the Java side in order to know eactly when to launch the intent. And since the FMX activity is no longer the default one, then it won't be started until it is launched by the splash screen activity.
      I think it may be a chicken & egg situation, but I'll apply some thought to it and see if the current approach can be improved upon any.

      Delete