Android Question [Solved] JobDone of HttpJob not response in my custom library

Status
Not open for further replies.

Steve Kwok

Member
Licensed User
Recently, I renew and compile an old codes (B4a v7.3) to Library by later version (B4a v9.8).
When I use this newer library in my new project, the call back function did not response!!!
Instead, it showed message "sending message to waiting queue of uninitialized activity (submitjob)" in log window.

When I use the original library in the same project, the call back function responses as before.

I finally find the "culprit" is okHttpUtils2 with version 2.91 inspired by: https://www.b4x.com/android/forum/t...e-of-uninitialized-activity-submitjob.103435/
The old custom library with okHttpUtils2 version 2.7 inside work fine as usual.

My worked-around in library project is:
  1. Uncheck OkHttpUtils2 in Libraries Manager;
  2. Download Erel's OkHttpUtils2 v2.7 Source Code from: [B4X] OkHttpUtils2 / iHttpUtils2 / HttpUtils2 source code;
  3. Project -> Add Existing Modules. Select 2 files, HttpJob.bas and HttpUtils2Service.bas and copy to your project;
  4. Rename HttpUtils2Service to different name such as svcHttpUtils2 and change all words of "HttpUtils2Service" in HttpJob.bas to "svcHttpUtils2";
  5. Project -> Compile To Library and the JobDone would be responsed again!
Hope it is helpful.
 

basic4mace

New Member
Licensed User
Longtime User
Just want to say thanks for this!!!
2021 and the problem still exists in B4A 10.50.

Following these steps solved the "sending message to waiting queue of uninitialized activity (submitjob)" problem for me too.
 
Upvote 0
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…