new 10-april-2020
removed SSL connection.
new link: http://www.mardomdog.it:5000/index2.html
new 15-march-2018
I migrated the webapp to VPS GOOGLE using SSL connection.
Special thanks to: @Ed Brown and @magi6162
Hello to all,
I have implemented a service on VPS AMAZON to handle customer requests, activities, and location of external staff.
The solution is open to possible integrations of third-party.
The solution uses:
-AMAZON virtual server
-App MARDOM STAC (android). link
-App CUSTOMER SUPPORT (android/apple), to be given to customers. links: apple android
Server and Apps uses GOOGLE DATASTORE as data repository.
The solution is able to receive the data sent by other apps
Send message:
B4X:
'Message structure:
'LLL >> 3 characters. lenght next field. example: 001
'FIELD TYPE >> 1 character
'LLL >> 3 characters. lenght next field
'FIELD NAME >> field name
'LLL >> 3 characters. lenght next field
'DATA >> field content
'legenda FIELD TYPE
'0 text
'1 number
'2 date
'3 hour
'4 barcode
Dim job4 As HttpJob
job4.Initialize("richiestasup1",Me)
Dim account As String="xxxxx"
Dim passwordOperator As String ="xxxxx"
Dim dateNow As String="21/09/2017"
Dim hourNow As String="14:54"
Dim customerId As String="unique customer id"
Dim titleRequest As String="xxxxx"
Dim message1 As String="xxxxx"
Dim message2 As String="xxxxx"
Dim messagen As String="xxxxx"
Dim nameApp As String="name of your app"
job4.Download2("http://mardomstac1.appspot.com/", Array As String("par0", "richiestasup1", _
"par1",account, "par2",passwordOperator, "par3",message1 & message2 & messagen, "par4",dateNow, _
"par5", hourNow, "par6",customerId, "par7",nameApp, "par8",titleRequest))
server response codes:
B4X:
Sub jobdone (job As HttpJob)
Select job.JobName
Case "richiestasup1"
Dim response As String=""
Dim idMessage As String=""
If job.Success = True Then
If job.GetString.Length >= 3 Then response = job.GetString.SubString2(0,3)
If job.GetString.Length > 3 Then idMessage = job.GetString.SubString(3)
End If
If response ="101" Then
Log("ERROR: account unknown")
End If
If response ="" Then
Log("ERROR")
End If
If response ="100" Then
Log("Message received. Id message: " &idMessage)
End If
End Select
End Sub
Thank you B4X ABMaterial
Last edited: