Android Question (Solved)App running twice?

Discussion in 'Android Questions' started by opus, Jan 17, 2015.

  1. opus

    opus Member Licensed User

    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
    Code:
    '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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    There is one process however this activity is part of the other app task so it shows with the other app icon.
     
    opus likes this.
  3. opus

    opus Member Licensed User

    Thanks for the feedback.

    BTW: Coding in B4A is fun.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice