walterf25 Expert Licensed User Longtime User Feb 10, 2012 #1 Hello everybody, i was wondering if anyone could help me out, i have my app almost finished but i wanted to display sort of a splashcreen but only once the first time the app is installed and opened for the first time, can anyone here help me with this, i'm pretty sure is something simple but my brain is fried right now. Thank guys, Walter
Hello everybody, i was wondering if anyone could help me out, i have my app almost finished but i wanted to display sort of a splashcreen but only once the first time the app is installed and opened for the first time, can anyone here help me with this, i'm pretty sure is something simple but my brain is fried right now. Thank guys, Walter
9 99toLife Member Licensed User Longtime User Feb 10, 2012 #2 Put something like this in Activity_Create: Code: Copy Dim prefString As String prefString = StateManager.GetSetting2("only_once", "0") If (prefString <> "1") Then ' Insert code to do what you want here... ' ... StateManager.SetSetting("only_once", "1") ' Set this so code doesn't run again StateManager.SaveSettings End If You'll also need StateManager and enable the RandomAccessFile library. Last edited: Feb 10, 2012 Upvote 0
Put something like this in Activity_Create: Code: Copy Dim prefString As String prefString = StateManager.GetSetting2("only_once", "0") If (prefString <> "1") Then ' Insert code to do what you want here... ' ... StateManager.SetSetting("only_once", "1") ' Set this so code doesn't run again StateManager.SaveSettings End If You'll also need StateManager and enable the RandomAccessFile library.
S susu Well-Known Member Licensed User Longtime User Feb 10, 2012 #3 I think this way is better: Code: Copy Sub Activity_Create(FirstTime As Boolean) If File.Exists(File.DirInternal,"check.1") = False Then File.WriteString(File.DirInternal,"check.1","blahblah") DoSomeThing 'Sub to do what you want when app runs first time End If Upvote 0
I think this way is better: Code: Copy Sub Activity_Create(FirstTime As Boolean) If File.Exists(File.DirInternal,"check.1") = False Then File.WriteString(File.DirInternal,"check.1","blahblah") DoSomeThing 'Sub to do what you want when app runs first time End If