O oymyakon Member Licensed User Longtime User May 14, 2020 #1 Hi, I am trying to make a widget that when a button is clicked it connects to an Mqtt server publishes and then disconnects. I have done what i need bur the android system keeps stuttering and saying the app keeps closing. any help would be appreciated. Attachments widget code.txt widget code.txt 1.3 KB · Views: 463
Hi, I am trying to make a widget that when a button is clicked it connects to an Mqtt server publishes and then disconnects. I have done what i need bur the android system keeps stuttering and saying the app keeps closing. any help would be appreciated.
Erel B4X founder Staff member Licensed User Longtime User May 15, 2020 #2 If the app is crashing then there should be an error message in the logs. Post it. Note that your app will not keep on running in the background unless you use a foreground service. Upvote 0
If the app is crashing then there should be an error message in the logs. Post it. Note that your app will not keep on running in the background unless you use a foreground service.
O oymyakon Member Licensed User Longtime User May 15, 2020 #3 Sorry, Perhaps i do not understand the widget. Does the main activity start every time you have a widget event? My widget does what is required sometimes but the button click event is not 100%. Paul. Attachments B4a Error.png 34.2 KB · Views: 542 widget code.txt widget code.txt 1.3 KB · Views: 465 Upvote 0
Sorry, Perhaps i do not understand the widget. Does the main activity start every time you have a widget event? My widget does what is required sometimes but the button click event is not 100%. Paul.
Erel B4X founder Staff member Licensed User Longtime User May 17, 2020 #4 Please post the error as text. Upvote 0