Android Question [ StateManager] Userclosed = true on Activity_Pause dont run ...

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
hello everyone !!
i am trying use StateManager with " Layout Session System " ,stateManager is not resetting settings
.

fallow code below >

#CODE_REMOVED#
 
Last edited:

Waldemar Lima

Well-Known Member
Licensed User
Longtime User
i am fix this question using this Code Module :

B4X:
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Private tmpSession As Map

End Sub

Sub InitSM As Map
    
    If File.Exists(File.DirInternal, "temporary.properties") = False Then
        Log("..")
        Dim m As Map
        m.Initialize
        m.Put("Session", "0")
        m.Put("Authentication", "")
        File.WriteMap(File.DirInternal,"temporary.properties",m)

    End If
    
    tmpSession = File.ReadMap(File.DirInternal,"temporary.properties")
    
    Return tmpSession
    
End Sub

Sub Update(mNew As Map) As Map
    
    File.Writemap(File.DirInternal,"temporary.properties",mNew)
    Return mNew
    'mUpdate = mNew
    
End Sub
 
Upvote 0
Top