Android Question Problem in CallSub

darabon

Active Member
Hi
I have a service that receives module object and event name and runs httpjob request and after done, call module with event and result
There is a problem
Sometime service cannot call event in the module during activity is not pause and show queue log or is pause activity
I use service to prevent the crash app
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I use service to prevent the crash app
1. There is no relation between running the code in a service to crashes. The behavior will be exactly the same.

2. Switch to B4XPages and these issues will just disappear.

Sometime service cannot call event in the module during activity is not pause and show queue log or is pause activity
3. Unless you switch to B4XPages, you need to be prepared to deal with paused activities. Only the activity that at the top can handle events.
You can use IsPaused(SomeActivity) to check its state before trying to call it with CallSub.
 
Upvote 0

darabon

Active Member
B4XPages is a good idea
Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…