se compilo Debug (legacy) la seconda richiesta si impalla
se compilo Debug (rapid) la seconda richiesta passa fino alla fine
se compilo Release la seconda richiesta si impalla
se compilo Release (obfuscated) la seconda richiesta si impalla
error Debug (legacy) la seconda richiesta si impalla ?????
ok Debug (rapid) la seconda richiesta passa fino alla fine
error Release la seconda richiesta si impalla ?????
error Release (obfuscated) la seconda richiesta si impalla ?????
sorgente
Uguale se uso req1.InitializePost2
Datemi delle idee.
se compilo Debug (rapid) la seconda richiesta passa fino alla fine
se compilo Release la seconda richiesta si impalla
se compilo Release (obfuscated) la seconda richiesta si impalla
error Debug (legacy) la seconda richiesta si impalla ?????
ok Debug (rapid) la seconda richiesta passa fino alla fine
error Release la seconda richiesta si impalla ?????
error Release (obfuscated) la seconda richiesta si impalla ?????
B4X:
Category
[{"category":"Advice"},{"category":"Animal"},{"category":"Assistance"},{"category":"Personal Care"},{"category":"Work"}]
B4X:
data
[{"a01":"Ivano","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"Vider","a06":"ivanomonti","a07":"Dog Sitter","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"mntvni64l20f205n","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Angelo","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"viber","a06":"giorgiamonti","a07":"Cat Sitter","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"0123456789ABC","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Giorgia","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"viber","a06":"giorgiamonti","a07":"Cat Sitter","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"0123456789ABC","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Fabio","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"viber","a06":"giorgiamonti","a07":"Cat Sitter","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"0123456789ABC","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Leonardo","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"viber","a06":"giorgiamonti","a07":"Other","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"0123456789ABC","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Sonia","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"viber","a06":"giorgiamonti","a07":"Veterinary","a08":"Mi piacciono gli animali perche stanno zitti","a09":"Solaro","a10":"true","a11":"0123456789ABC","a12":"5","a13":"animal","a14":"07\/08\/2014","a15":"10:38","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"Ivano","a02":"Monti","a03":"3929824007","a04":"[email protected]","a05":"Viber","a06":"ivanomonti","a07":"Other","a08":"Eseguo lavori di ogni genere","a09":"Solaro","a10":"true","a11":"mntvni64l20f205n","a12":"5","a13":"Work","a14":"08\/07\/2014","a15":"13:00","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"angelo","a02":"monza","a03":"3929824007","a04":"[email protected]","a05":"Viber","a06":"amonza","a07":"Animal","a08":"Dog Sitter","a09":"cazzata","a10":"solaro","a11":"8\/8\/2014","a12":"3:40:04 PM","a13":"yes","a14":"1234567890","a15":"","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"angelo","a02":"monza","a03":"3929824007","a04":"[email protected]","a05":"Viber","a06":"amonza","a07":"Animal","a08":"Dog Sitter","a09":"cazzata","a10":"solaro","a11":"8\/8\/2014","a12":"3:40:04 PM","a13":"yes","a14":"1234567890","a15":"","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"},{"a01":"cazzarola","a02":"monza","a03":"3929824007","a04":"[email protected]","a05":"Viber","a06":"amonza","a07":"Animal","a08":"Dog Sitter","a09":"cazzata","a10":"solaro","a11":"8\/8\/2014","a12":"3:40:04 PM","a13":"yes","a14":"1234567890","a15":"","a16":"Null","a17":"Null","a18":"Null","a19":"Null","a20":"Null"}]
sorgente
B4X:
#Region Project Attributes
#ApplicationLabel: Job2Go
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: false
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim hc1 As HttpClient
Dim ListCategory, ListData, ListUser, ListTools As List
Dim ix,iy As Int
Dim lw,lw1 As ListView
Dim t1 As Timer
End Sub
#Region Activity
Sub Activity_Create(FirstTime As Boolean)
ix=0
iy=0
Activity.LoadLayout("Main")
End Sub
Sub Activity_Resume
If Mod_Global.toogleWiFi = False Then
ToastMessageShow("Wifi or 3G status off", True)
Activity.Color = Mod_Global.colorStep(False)
Msgbox("No connections present","Alert")
Else
menuActivity
loadListCategoryAndData
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Activity_Touch (Action As Int, X As Float, Y As Float)
If X > ix Then
If lw.IsInitialized = False Then
ListVisible
Else
End If
Return
End If
End Sub
Sub Activity_Click
End Sub
Sub Activity_LongClick
End Sub
#End Region
#Region menu
Sub menuActivity()
Activity.AddMenuItem("New Post","menu1")
Activity.AddMenuItem("Update List data","menu2")
Activity.AddMenuItem("Setting","menu3")
Activity.AddMenuItem("Info","menu4")
Activity.AddMenuItem("Close","menu5")
End Sub
Sub menu2_Click
loadListCategoryAndData
End Sub
#End Region
#Region load category and data
Public Sub loadListCategoryAndData()
ListCategory.Initialize
ListData.Initialize
hc1.Initialize("httpCategoryData")
Dim req1 As HttpRequest
req1.InitializeGet("http://mysite.eu/ivano/cXVlcnlsaWJlcmE=.php?q=" & "category")
hc1.Execute(req1, 1)
Dim req1 As HttpRequest
req1.InitializeGet("http://mysite.eu/ivano/cXVlcnlsaWJlcmE=.php?q=" & "data")
hc1.Execute(req1, 2)
End Sub
Sub httpCategoryData_ResponseError(Reason As String, StatusCode As Int, TaskId As Int)
ToastMessageShow("Error. TaskId: " & TaskId & ", Reason: " & Reason & ", StatusCode: " & StatusCode, True)
End Sub
Sub httpCategoryData_ResponseSuccess(Response As HttpResponse, TaskId As Int)
Try
If Response <> Null Then
If TaskId = 1 Then
Dim s As String
s = Response.GetString("UTF8")
Log(s)
jsonParseCategory(s)
Response.Release
End If
If TaskId = 2 Then
Dim s As String
s = Response.GetString("UTF8")
Log(s)
jsonParseData(s)
Response.Release
End If
Else
ToastMessageShow("Error response socket", True)
End If
Catch
End Try
End Sub
Private Sub jsonParseCategory(s As String)
Try
Dim JSON As JSONParser
JSON.Initialize(s)
ListCategory = JSON.NextArray
ToastMessageShow("Updated category list", True)
Catch
ToastMessageShow("Error parse json data", True)
End Try
End Sub
Private Sub jsonParseData(s As String)
Try
Dim JSON As JSONParser
JSON.Initialize(s)
ListData = JSON.NextArray
ToastMessageShow("Updated data list", True)
Catch
ToastMessageShow("Error parse json data", True)
End Try
End Sub
#End Region
#Region list post visible
Sub ListVisible
lw.Initialize("lw")
For Each colroot As Map In ListCategory
Dim s As String
s = colroot.Get("category")
lw.AddSingleLine(s)
Next
Activity.AddView(lw,0,0,Activity.Width/2,Activity.Height)
End Sub
Sub lw_ItemClick (Position As Int, Value As Object)
Dim colroot As Map
colroot = ListCategory.Get(Position)
Dim s,ss As String
s = colroot.Get("category")
Dim f As String = s
If lw1.IsInitialized = True Then
For i = 0 To Activity.NumberOfViews
If Activity.GetView(i) = lw1 Then
Activity.RemoveViewAt(i)
End If
Next
End If
lw1.Initialize("lw1")
Activity.AddView(lw1,Activity.Width/2,0,Activity.Width/2,Activity.Height)
For Each colroot As Map In ListData
Dim s,ss,sss As String
sss = colroot.Get("a13")
If sss.ToUpperCase = f.ToUpperCase Then
s = colroot.Get("a01") & " " & colroot.Get("a02")
ss = colroot.Get("a13")
lw1.AddTwoLines(s,ss)
End If
Next
End Sub
Sub lw_ItemLongClick (Position As Int, Value As Object)
End Sub
#End Region
Uguale se uso req1.InitializePost2
Datemi delle idee.