rleiman Well-Known Member Licensed User Longtime User May 8, 2018 #1 Hi Everyone, Can you tell me what coding I need to add to the widget service in order to call an activity when the user taps the widget? Thanks.
Hi Everyone, Can you tell me what coding I need to add to the widget service in order to call an activity when the user taps the widget? Thanks.
Pendrush Well-Known Member Licensed User Longtime User May 8, 2018 #2 For example (if panel name is Panel1): B4X: Sub Panel1_Click StartActivity(Main) 'Main is name of activity you want to start, add name of your activity End Sub add this code in widget service. Upvote 0
For example (if panel name is Panel1): B4X: Sub Panel1_Click StartActivity(Main) 'Main is name of activity you want to start, add name of your activity End Sub add this code in widget service.
rleiman Well-Known Member Licensed User Longtime User May 8, 2018 #3 Pendrush said: For example (if panel name is Panel1): B4X: Sub Panel1_Click StartActivity(Main) 'Main is name of activity you want to start, add name of your activity End Sub add this code in widget service. Click to expand... Hi Pendrush, I tried to right click in the designer to declare a Dim for the panel but instead got a message telling me "Current module does not support adding members". Looks like with widgets there must be a different way to do it. Upvote 0
Pendrush said: For example (if panel name is Panel1): B4X: Sub Panel1_Click StartActivity(Main) 'Main is name of activity you want to start, add name of your activity End Sub add this code in widget service. Click to expand... Hi Pendrush, I tried to right click in the designer to declare a Dim for the panel but instead got a message telling me "Current module does not support adding members". Looks like with widgets there must be a different way to do it.
rleiman Well-Known Member Licensed User Longtime User May 8, 2018 #4 Hi Everyone, It turns out you I didn't need to declare a Dim for the panel. Just using the panel name like Pendrush stated was all I needed to do. Here's the code that worked: B4X: Sub MyPanel_Click StartActivity(Main) End Sub Upvote 0
Hi Everyone, It turns out you I didn't need to declare a Dim for the panel. Just using the panel name like Pendrush stated was all I needed to do. Here's the code that worked: B4X: Sub MyPanel_Click StartActivity(Main) End Sub