Android Question HttpJob not download last data

Treyvanoft

Member
Licensed User
Longtime User
HttpJob can't download last update data from database i delete some row from database but it's not remove from application
 

DonManfred

Expert
Licensed User
Longtime User
Are you Reusing your jobowngetpet Or Are you always Use a New dim httpjob and initialisation? The latter is right.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
It is working fine for me...

B4X:
Sub Activity_Resume
    ' Array As String("p1", "Php", "p2", "MySql")
    Dim jobgetpet As HttpJob
  Dim email As String = "pettyp@treyvasoft.com"
  jobgetpet.Initialize("getpet", Me)
  jobgetpet.Download("http://www.pettyp.com/pettyp/pservice/getfn.php?fn=getpet&emadolo="& email)
End Sub
Sub JobDone(Job As HttpJob)
  If Job.Success Then
      Dim Res As String = Job.GetString
    Log("Back from Job:" & Job.JobName )
    Log("Response from server: " & Res)
       
    End If
End Sub

Here is the log after multiple orientationchanges....

LogCat connected to: 05157df57d72d204
--------- beginning of main
--------- beginning of system
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (httputils2service) Create **
** Service (httputils2service) Start **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = false **
** Activity (main) Create, isFirst = false **
** Activity (main) Resume **
Back from Job:getpet
Response from server: [{"petid":"483206","owenerid":"pettyp@treyvasoft.com","petname":"jskdkd","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:35:00","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"},{"petid":"1576066","owenerid":"pettyp@treyvasoft.com","petname":"zhxkkzk","address":"","type":"0","petbirth":"2015-01-01","species":"0","breed":"hxjz","imgpet1":"","imgpet2":"","rectime":"2015-09-18 12:38:19","sex2":"\u0e40\u0e1e\u0e28\u0e1c\u0e39\u0e49","sp":"\u0e2a\u0e38\u0e19\u0e31\u0e02"}]
** Activity (main) Pause, UserClosed = true **
 

Attachments

  • treyvanoft.zip
    6.8 KB · Views: 131
Upvote 0

Treyvanoft

Member
Licensed User
Longtime User
It is working fine for me...

B4X:
Sub Activity_Resume
    ' Array As String("p1", "Php", "p2", "MySql")
    Dim jobgetpet As HttpJob
  Dim email As String = "pettyp@treyvasoft.com"
  jobgetpet.Initialize("getpet", Me)
  jobgetpet.Download("http://www.pettyp.com/pettyp/pservice/getfn.php?fn=getpet&emadolo="& email)
End Sub
Sub JobDone(Job As HttpJob)
  If Job.Success Then
      Dim Res As String = Job.GetString
    Log("Back from Job:" & Job.JobName )
    Log("Response from server: " & Res)
     
    End If
End Sub

Here is the log after multiple orientationchanges....
Thanks. Don. i can get data from server but it's not real-time data. i find this problem because cache from server. i add new parameter(time format) before send to server .
 
Upvote 0
Top