J Jondroid Member Licensed User Longtime User Aug 27, 2012 #1 I'm using successfully a thread in my activity to run a function which otherwise trows an error that this function can not be executed from the main application thread. However I want to use that function now in a service module. However, it seems that it is impossible to add the threading module to an service module?! I understand that from within a service module it is impossible to modify Activity objects but why is a "thread" considered to be an Activity object? Last edited: Aug 27, 2012
I'm using successfully a thread in my activity to run a function which otherwise trows an error that this function can not be executed from the main application thread. However I want to use that function now in a service module. However, it seems that it is impossible to add the threading module to an service module?! I understand that from within a service module it is impossible to modify Activity objects but why is a "thread" considered to be an Activity object?
Erel B4X founder Staff member Licensed User Longtime User Aug 27, 2012 #2 I'm using successfully a thread in my activity to run a function which otherwise trows an error that this function can not be executed from the main application thread. Click to expand... Which function are you calling? The Thread object is not an "activity object". You should be able to use it from a service. Upvote 0
I'm using successfully a thread in my activity to run a function which otherwise trows an error that this function can not be executed from the main application thread. Click to expand... Which function are you calling? The Thread object is not an "activity object". You should be able to use it from a service.
J Jondroid Member Licensed User Longtime User Aug 27, 2012 #3 Erel said: Which function are you calling? The Thread object is not an "activity object". You should be able to use it from a service. Click to expand... I'm calling my new library (see the other thread regarding generating keyevents)... maybe I need to look into my code again.. Will look into it agains. Thanks. Upvote 0
Erel said: Which function are you calling? The Thread object is not an "activity object". You should be able to use it from a service. Click to expand... I'm calling my new library (see the other thread regarding generating keyevents)... maybe I need to look into my code again.. Will look into it agains. Thanks.
S synapse Member Licensed User Longtime User Jul 18, 2014 #4 Can anyone help please with declaring a thread within a service module? It is rejected in the process_globals section of the service and ignored if declared in the activity. Sorry to be thick! Upvote 0
Can anyone help please with declaring a thread within a service module? It is rejected in the process_globals section of the service and ignored if declared in the activity. Sorry to be thick!
Erel B4X founder Staff member Licensed User Longtime User Jul 20, 2014 #5 This is an old forum thread. It is better to start a new one. Also explain what exactly are you trying to implement. Upvote 0
This is an old forum thread. It is better to start a new one. Also explain what exactly are you trying to implement.