Android Question HttpUtils and OkHttpUtils

Massimiliano

Member
Licensed User
Longtime User
Hi,
I have a problem that is driving me crazy
my app has many activities (main and others).
All is working fine until I activate some code that make use of httputils.
The httpjobs work fine (I receive what expected from the server), but from time to time the foreground activity "X" closes (userclosed = false in the log) and it's shown the main activity. Exiting from the main activity, brings up the "X" activity closed. So, my app seems to be crazy.

Any hint?
Thank you
 

Massimiliano

Member
Licensed User
Longtime User
Thank you Don!
I think that this solution requires a lot of effort - over the few lines inside the activities (dim httpjob, post and sub jobdone)

sigh

there would be nothing more easy?
 
Upvote 0

Massimiliano

Member
Licensed User
Longtime User
As Don wrote you need to use a service. You can use the starter service for this.

Otherwise the target activity will be started when JobDone is raised.
Thank you Erel,
i'm using starter service from v5.5, thinking that my problem was related to some global variables as described in other threads.
Now i've found that my problem it about httputils.

Could you post a little example for making the job easier.... for me and (hope) other b4a friends?

Thank you so much Erel! ;-)
Massimiliano
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…