Android Question appupdating 2.00 reports sending message to waiting queue of uninitialized activity (submitjob)

MbedAndroid

Active Member
Licensed User
trying new version 2.0 it seems to enter a waiting loop. Even the example will give this error.
sending message to waiting queue of uninitialized activity (submitjob) is reported a few times on this forum in relation with b4a 8.8
Any suggestions how to solve this?

log:
Logger connected to: asus K013
--------- beginning of main
Copying updated assets files (2)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Receiver (newinst2) OnReceive **
*** Service (newinst2) Create ***
---- AppUpdating.newinst2: service created
** Service (newinst2) Start **
---- AppUpdating.newinst2: service_started
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
---- AppUpdating.UpdateApk
sending message to waiting queue of uninitialized activity (submitjob)
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
 
Last edited:

udg

Expert
Licensed User
** Service (newinst2) Start **
---- AppUpdating.newinst2: service_started
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
---- AppUpdating.UpdateApk
sending message to waiting queue of uninitialized activity (submitjob)
I'm not an expert at reading logs but here it seems that something makes the newinst2 service start (i.e a Package_Replaced OS message), then the Main is closed (so the message should have been about this specific app). After that the app is restarted, its Starter service created and started, then Main Create and Main Resume where a command to launch UpdateApk is found (probabily it the one that started the whole chain of events when we were in the "old" app).
I don't know what calls the activity "submitjob" since in my code I have got no activities other than Main.

May I suggest to look at this part of your code (how you go from UpdateApk to SubmitJob)?
Another thing you may try is to temporaly activate the verbose option in the lib so to receive many more logs.
 

MbedAndroid

Active Member
Licensed User
hi UDG , this log is coming from your example (appupdatingexample2) as shown in your topic.
The opening and closing you see is when the tablet is turned.
So far i could investigate this problem concentrates it around the Httpjob function.
I dont think it has anything to do with your appupdating code, but more the resumable httpjob functions in b4a 8.8, and specific when you put such a function in a library.
 

MbedAndroid

Active Member
Licensed User
got a bit deeper into it.
First i made a very simple program which downloaded the AppUpdateExample2.inf from UDG server. This works with b4a 8.8.

Logger connected to: asus K013
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
ver=2.11

<ChangeLog>

ver 1.01 - initial release

ver 1.87 - added status codes

ver 2.11 - bug fixes

</ChangeLog>

<FileSize>

1042287

</FileSize>
Then i moved the code to a compiled library and attached the library to the same program.
Now i got exactly the same message, the code wont download the AppUpdateExample2.inf on the server.

I think Erel should have a look into this, somehow you cant move the httpjob to a library
Logger connected to: asus K013
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
sending message to waiting queue of uninitialized activity (submitjob)
 

Attachments

MbedAndroid

Active Member
Licensed User
last step was succesfull.
Moved all files from UDG library into a class (same names) and inserted in my program.
Compiled and updating apk was succesfull!

This means that when httpjob is compiled into a library it isnt functioning as it should be in version b4a 8.8
 

MbedAndroid

Active Member
Licensed User
1) WorkingExample.zip is a file with a httpjob example which works.
2) WorkingExampleWithClass.zip is a file where the httpjob is moved to a class and works.
3) HttpjobWithMessage is a file which fails, when the httpjob is moved to a library.
3a) CodeLibary.zip is the code which i compiled and attached a library into HttpjobWithMessage
3b) Testclass.jar and Testclass.xml is the compiled library
 

Attachments

MbedAndroid

Active Member
Licensed User
Erel i send all files. see post#9
if you run 1) you will get data from UDG server
when you run 3) it fails.
in fact i moved this code to a class or library or run in main
B4X:
Sub DownloadQuote
   Dim j As HttpJob
   j.Initialize("", Me) 'name is empty as it is no longer needed

   j.Username ="test"
   j.Password = "test"
   j.Download("http://www.dgconsulting.eu/free_apk/AppUpdateExample2.inf")
   Wait For (j) JobDone(j As HttpJob)
   If j.Success Then
'       The result Is a json string. We parse it And Log the fields.
       Log(j.GetString)
   End If
   j.Release
End Sub
[code]
 
Top