Android Question Activity_Resume run 2 times

D

Deleted member 103

Guest
Hi,

can someone tell me why the Activity_Resume is run 2 times?
What can I do to make the Activity_Resume run only once?
Or is it normal? If so, then I have not noticed until now.

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
End Sub

Sub Activity_Resume
    Msgbox2Async("Message", "Titel", "OK", "", "", Null, False)
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
 

LucaMs

Expert
Licensed User
Longtime User
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
So, looks like the problem lies in B4a and Android 8.0.
I think it could also be due to the first absolute run, regardless of B4A and ADB.

If you could do a test with an app developed with a different tool, other than B4A...!
 
Upvote 0
D

Deleted member 103

Guest
If it happens with ADB then it is not a problem in B4A. B4A just calls ADB and ADB sends the intent that starts your app.
Problem solved! B4a is not guilty, only ADB is guilty. ;)
Test with B4A-Bridge is OK, here is the log:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
Time:19:38:07
 
Upvote 0
Top