J Jakonil New Member Licensed User Longtime User Apr 9, 2013 #1 Hello, i am newbie and that's my first app and i appreciate some help. All is working well until an InputList does not work with Service module. I attache the entire app. The problem is locate on the Sub Set_Paired (line 152). The log display must be 2 (i have 2 entries in my list) but is the value is -3 : Code: Copy Log("Liste_Found.Size: " & Liste_Found.Size) The line 186 return null value : Code: Copy serial1.Connect(ConnectDevice.Mac) I tried to replace this line by : Code: Copy serial1.Connect("00:12:10:24:08:53") the app don't crash. If i do not use Service Module, the program work well as expected. I have surched, but i did not found any answer. Thank you Attachments CliBt_BA.zip CliBt_BA.zip 13.8 KB · Views: 334
Hello, i am newbie and that's my first app and i appreciate some help. All is working well until an InputList does not work with Service module. I attache the entire app. The problem is locate on the Sub Set_Paired (line 152). The log display must be 2 (i have 2 entries in my list) but is the value is -3 : Code: Copy Log("Liste_Found.Size: " & Liste_Found.Size) The line 186 return null value : Code: Copy serial1.Connect(ConnectDevice.Mac) I tried to replace this line by : Code: Copy serial1.Connect("00:12:10:24:08:53") the app don't crash. If i do not use Service Module, the program work well as expected. I have surched, but i did not found any answer. Thank you
Erel B4X founder Staff member Licensed User Longtime User Apr 10, 2013 #2 You cannot show any UI (except of toast messages) from a service. You can use CallSubDelayed to call a sub in an activity that will show the InputList. Upvote 0
You cannot show any UI (except of toast messages) from a service. You can use CallSubDelayed to call a sub in an activity that will show the InputList.