He
B4A 9.80
Android 28
jdk1.8.0
Manifest Editor
From the WAIT code it goes to another event, no error comes, please I need help
B4A 9.80
Android 28
jdk1.8.0
Manifest Editor
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
CreateResourceFromFile(Macro, Themes.DarkTheme)
SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)
CreateResource(xml, network_security_config.xml,
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>
)
B4X:
Try
Dim PageServer As String
PageServer = "http://xxx.xxx.xx/xx/datacsjar.php"
Dim js As HttpJob
js.Initialize("", Me)
js.download2(PageServer, Array As String ("tabla","sede"))
Wait For (js) JobDone(js As HttpJob) '[B]from here goes another event [/B][/B]
If js.Success Then
Dim res As String
res = js.GetString
Dim parser As JSONParser
parser.Initialize(res)
If res <> False Then
Dim Tabla As List
Tabla = parser.NextArray
Dim Fila As Map
Dim codigo,descripcion As String
If Tabla.size=0 Then
Msgbox("ID no encontrado","Aviso")
Return
End If
For i=0 To Tabla.size-1
Fila = Tabla.Get(i)
codigo = Fila.Get("c_sede")
descripcion = Fila.Get("s_sede")
Lvt_sede.AddTwoLines(codigo,descripcion)
spn_sede.Add(descripcion)
Next
End If
End If
Catch
Log(LastException)
End Try
From the WAIT code it goes to another event, no error comes, please I need help