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
src\b4a\example\communicator.java:138: error: inconvertible types
_ms._initialize(processBA,(anywheresoftware.b4a.objects.ActivityWrapper) anywheresoftware.b4a.AbsObjectWrapper.ConvertToWrapper(new anywheresoftware.b4a.objects.ActivityWrapper(), (anywheresoftware.b4a.BALayout)(mostCurrent._rcam.getObject())));
^
required: BALayout
found: Class<CAP#1>
where CAP#1 is a fresh type-variable:
CAP#1 extends Object from capture of ?
 
Top