Hi Pepe,
it is extremely simpler to implement your barcode reader using Appeon Mobile than Android SDK.
Create a regular PB window, add a button, and in the clicked event write this 3 lines of code:
eon_mobile_barcodeex barcode
barcode = CREATE eon_mobile_barcodeex
barcode.of_read(ls_code, li_format)
The code will activate the camera, which will turn into a barcode reader (a scanning square) and will return the actual code (ls_code variable) and the related format (li_format variable) among the many that are supported (EAN-8, UPC-E4, CODE 128, CODE 93, CODE 39, QR CODE to name a few).
Have a look at the simple API:
https://www.appeon.com/support/documents/appeon_online_help/ps2019/workarounds_and_api_guide/ch01s04s03.html#eon_mobile_barcode_object
With PowerBuilder Universal edition you can install PowerServer (PB Edition) too.
Once done, add to your PB workspace the PBL containing the Mobile extensions (e.g. eon_mobile_barcodeex object). This PBL is installed located at
C:\inetpub\wwwroot\appeon\developTempFile\appeon_workarounds\appeon_workaround.pbl
Best,
.m
I've done it and almost everything is going well.
I 've made de APP, and deployed it. The app opens in the phone, but the deployment shows me some errors:
17:20:13 00005: Failed to parse the source code. Line: 6
17:20:13 Failed to parse UserObject soappbcookie.
17:20:13 00005: Failed to parse the source code. Line: 6
17:20:13 Failed to parse UserObject soapexception.
17:20:13 00005: Failed to parse the source code. Line: 6
17:20:13 Failed to parse UserObject soapconnection.
17:20:15 00901: Cannot connect to DSN. The database server is amcdb2_tcp.
17:20:15 Failed to generate DWSQL.
17:20:19 01005: Configuration for Web service object (webservice) is incorrect.
17:20:19 01001: Failed to generate ProxyObject webservice.
The app runs OK in PB2017, and the connection to the WebService works fine.
This is the code of my "Enviar Button":
SoapConnection conn // Definimos conexión SOAP
webservice proxy_obj // Declaramos proxy
long rVal
string ls_codbar, ls_calibre, ls_resultado
decimal lc_bultos
boolean lb_vacio
lb_vacio = false
if isnull(sle_codbar.text) then
messagebox("Atencion","Debe rellenar el codigo de barras")
end if
ls_codbar = sle_codbar.text
ls_calibre = sle_calibre.text
lc_bultos = dec(sle_bultos.text)
conn = create SoapConnection
rVal = Conn.CreateInstance(proxy_obj, &
"webservice")
ls_resultado = proxy_obj.palletmarcadora( "marcadora",ls_codbar,lc_bultos, ls_calibre)
if ls_resultado = "OK" then
messagebox("", "Marcaje Correcto")
else
messagebox("Error", "Fallo al insertar el pallet")
end if