Displaying screen only once

walterf25

Expert
Licensed User
Longtime User
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
 
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:
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
 
Upvote 0
Back
Top