Android Question Open a Activity closed

Douglas Farias

Expert
Licensed User
Longtime User
hi
i have a simple question

i make one activity named Main other test

When i press button1 in Main activity
i put this function

MAIN ACTIVITY
B4X:
Sub Button1_Click
CallSubDelayed(test, "teste")
Activity.Finish
End Sub

sub teste
end sub

to call my test activity
it works fine

now in my test activity i want to open again Main Activity
it is possible?
TEST ACTIVITY

B4X:
Sub Button1_Click
CallSubDelayed(Main, "teste")
Activity.Finish
End Sub

sub teste
end sub

but dont work because Main activity is closed
have a way to open Main activity in other acitivity?


for example
TEST ACTIVITY

B4X:
Sub Button1_Click
'OPEN OR INITIALIZATE Main activity later
CallSubDelayed(Main, "teste")
Activity.Finish
End Sub

sub teste
end sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…