Hello everybody.
I have a question.
When I start the main activity, I check FirstTime then I start a procedure to read settings from a file (Settings.ini)
It work's fine, but if at that point I click on the "Back button" of my phone, AND I start the app again, The Activity is full black and application blocked.
How do I have to manage the closing of Activity?
Same question when I use StartActivity(Layout2) and from Layout2 I click on "Back button"
Thank You
O.
I have a question.
When I start the main activity, I check FirstTime then I start a procedure to read settings from a file (Settings.ini)
B4X:
If FirstTime Then
If File.Exists(File.DirInternal, "Settings.ini") = False Then
File.Copy(File.DirAssets, "Settings.ini", File.DirInternal, "Settings.ini")
End If
Activity.LoadLayout("Main")
'Read Settings.ini file
ReadIniFileIntoMap
End If
Sub ReadIniFileIntoMap
'Read setting.ini file and fill al Public variable
SettingsMap1 = File.ReadMap(File.DirInternal, "Settings.ini")
strNameCam1 = SettingsMap1.Get("NameCam1")
strNameCam2 = SettingsMap1.Get("NameCam2")
End Sub
It work's fine, but if at that point I click on the "Back button" of my phone, AND I start the app again, The Activity is full black and application blocked.
How do I have to manage the closing of Activity?
Same question when I use StartActivity(Layout2) and from Layout2 I click on "Back button"
Thank You
O.