Widget's click event don't work

Johnmcenroy

Active Member
Licensed User
Longtime User
Hello
I have the following code:
B4X:
'Service module
Sub Process_Globals
   Dim rv As RemoteViews
End Sub

Sub Service_Create
   rv = ConfigureHomeWidget("csw", "rv", 0, "Christmas Carols", True)
End Sub

Sub Service_Start (StartingIntent As Intent)
   If rv.HandleWidgetEvents(StartingIntent) Then Return
End Sub

Sub rv_RequestUpdate
    rv.UpdateWidget
End Sub

Sub rv_Disabled
   StopService("")
End Sub

Sub Service_Destroy

End Sub

Sub lblW_Click
    Msgbox ("test","test")
   StartActivity(Main)
End Sub

Sub btnMoreW_Click
   Dim Internet As Intent
    Internet.Initialize(Internet.ACTION_VIEW, "http://www.google.com")
    StartActivity(Internet)
End Sub

lblW_Click and btnMoreW don't work
I can't understand why.

In widget tutorial all works fine.

Thanks.John.
 
Top