Changing Splash Screen on Each New Session

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Brahmanathaswami
Posts: 52
Joined: Mon Jun 24, 2013 4:10 am
Contact:

Changing Splash Screen on Each New Session

Post by Brahmanathaswami » Wed Apr 22, 2015 11:50 pm

On the web long ago, I used a technique for some random images that changed on a schedule that does not cycle through filenames.. instead the html would use something like:

header-top-main.jpg

then I has a folder with different images
/header-images
lotusFlowers.jpg
plumeria.jpg
cosmic-stars.jpg

Then I used a cron that would check the filenames in that folder, pick one and cp it out to the same name, overwriting "header-top-main.jpg"

Can we do the same thing on our mobile app? This assumes the path to splash screen is looking for a specific image on disk. ... if, when your app booted up, in the background you did the same thing: copied from a small repository to "my-app-splash-screen.jpg" in the correct location, then the next time the user opened the app, the image would change. Of course in the interests of branding consistency you would be using a logo and some words that never change.. but the image behind them could be different.

Any reason this cannot work? when you select a splash screen... where is this stored in the app package?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Changing Splash Screen on Each New Session

Post by Mark » Thu Apr 23, 2015 9:53 am

Hi,

The splash screen is stored in a folder in the app bundle. If you changed this, the signature becomes invalid and the app won't start anymore. Moreoever, you can't write to the app bundle. So, what you want is impossible.

The closest you can get to the desired result is a very simple splash screen, e.g. black with your logo, as the default splash screen of your mobile app and a picture on the first card of your stack. Don't put anything in (pre)openStack, startUp, pre(openCard) etc. handlers but run any initializing scripts after the first card opens, using a "send in time" command:

Code: Select all

on openCard
  send "setUp" to me in 0 millisecs
end openCard

on setUp
  // put your initialising scripts here
end setUp
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Brahmanathaswami
Posts: 52
Joined: Mon Jun 24, 2013 4:10 am
Contact:

Re: Changing Splash Screen on Each New Session

Post by Brahmanathaswami » Thu Apr 23, 2015 11:46 pm

OK will try that. Tks

Post Reply