Android Question Close Activity event

klingon467

Member
Licensed User
Longtime User
Hi,
i want to close my activity form...
Instead of the command: StartActivity(rCam)

StopActivity(rCam) ???? does not exist ????

i have try with:
B4X:
  If chChat.Enabled = True Then
  StartActivity(rCam)
   Else If chChat.Enabled = False Then
Dim ms As mShared
ms.Initialize(rCam)
ms.closeActivity
   Else
     log(LastException.Message)
   End If

B4X:
'Class module mShared
Sub Class_Globals
    Dim myp As Activity
End Sub
Public Sub Initialize(act As Activity)
myp=act
End Sub
Sub closeActivity
    myp.Finish
End Sub

but not work????

i have this exception
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…