Sub hc_ResponseError(Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
Msgbox(Reason, "Error parsing")
End Sub
Sub ParseResults_StreamFinish(Success As Boolean, TaskId As Int)
Dim jParser As JSONParser
Dim JSONText As String
JSONText = File.ReadString(File.DirDefaultExternal, "JsonData.txt")
jParser.Initialize(JSONText)
Dim root As Map = jparser.NextObject
Dim data As Map = root.Get("data")
' Dim status_code As Int = root.Get("status_code")
' Dim message As String = root.Get("message")
Dim seller_name As String = data.Get("seller_name")
Dim shoped_date As String = data.Get("shoped_date")
Dim arrived_date As String = data.Get("arrived_date")
Dim error As String = data.Get("error")
Dim next_place As String = data.Get("next_place")
Dim customer_phone As String = data.Get("customer_phone")
Dim seller_phone As String = data.Get("seller_phone")
Dim customer_name As String = data.Get("customer_name")
Dim package_name As String = data.Get("package_name")
Dim shipping_address As String = data.Get("shipping_address")
Dim complete As String = data.Get("complete")
Dim passed_place As List = data.Get("passed_place")
For Each colpassed_place As String In passed_place
Next
Dim error_message As String = data.Get("error_message")
Dim quantity As String = data.Get("quantity")
' ListView1.AddSingleLine (root.Get("message"))
' ListView1.AddSingleLine (root.Get("status_code"))
ListView1.AddSingleLine(customer_name)
ListView1.AddSingleLine(customer_phone)
ListView1.AddSingleLine(shipping_address)
ListView1.AddSingleLine(shoped_date)
ListView1.AddSingleLine(package_name)
ListView1.AddSingleLine(quantity)
ListView1.AddSingleLine(seller_name)
ListView1.AddSingleLine(seller_phone)
ListView1.AddSingleLine(next_place)
ListView1.AddSingleLine(arrived_date)
ListView1.AddSingleLine(complete)
ListView1.AddSingleLine(error)
ListView1.AddSingleLine(error_message)
ListView1.SetSelection(0)
End Sub
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Resume **
Error occurred on line: 95 (main)
java.lang.RuntimeException: Object should first be initialized (Map).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:46)
at anywheresoftware.b4a.objects.collections.Map.Get(Map.java:65)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:302)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
at anywheresoftware.b4a.BA$3.run(BA.java:319)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5142)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
at dalvik.system.NativeStart.main(Native Method)
Dim status_code As Int = root.Get("status_code")
Dim status_code As Int = -1
Try
status_code = root.Get("status_code")
Catch
End Try
Select Case status_code
Case 200
' Your order still processing
Dim message As String = root.Get("message")
..... and what I need to do
Case 404
' Order not found
..... and what I need to do
Case Else
...... ID found
End Select