I have a situation where my app seems to run twice, which isn't possible.
The app is started, then paused and after that using a click on a specific file (which is registered to my app) in the file-explorer my app is "started" again.
When looking at processes run (long click on home-button) the screen of my app is shown twice. That lets assume, the app is running twice, however the associated icon is different. One is from my app the other from the file-explorer.
When trying to select to process with the explorer-icon, initially my app is coming up, but when hitting the Back-button, the explorer is coming up.
Is this a bug, or am I doing something wrong in handling the Intent?
Code at end of my Activity_create
The app is started, then paused and after that using a click on a specific file (which is registered to my app) in the file-explorer my app is "started" again.
When looking at processes run (long click on home-button) the screen of my app is shown twice. That lets assume, the app is running twice, however the associated icon is different. One is from my app the other from the file-explorer.
When trying to select to process with the explorer-icon, initially my app is coming up, but when hitting the Back-button, the explorer is coming up.
Is this a bug, or am I doing something wrong in handling the Intent?
Code at end of my Activity_create
B4X:
'Handling of the Intents (ala CommandString)
If Activity.GetStartingIntent = StartingIntent Then
'intent already handled
Else
StartingIntent = Activity.GetStartingIntent
'Handling the new Intent
Dim lNewGameFile As String
lNewGameFile=StartingIntent.GetExtra("key_filename")
If Not (lNewGameFile="null") Then
Dim lPath As String
Dim lFileName As String
Dim lStringParts As List
lStringParts.Initialize
lStringParts=sf.Split( lNewGameFile,"/" )
lFileName=lStringParts.Get(lStringParts.Size-1)
lPath=sf.Left(lNewGameFile, lNewGameFile.Length-lFileName.Length-1)
If sf.FileExist(lNewGameFile) Then
Dim NewGameString As String = File.GetText(lPath,lFileName)
NewGameState_read(NewGameString)'Reads in a new GameState from a String
Else
Return
End If
End If
End If