Overview and Key steps

  • When creating VBP for Android please select the checkbox Android Grids Indicator.

 

  • Use TransLution Upgrade utility to update all VBP. This will add a new method called MethodAndroid and no existing vbp methods will be changed.
  • Button mapping works same as the other vbp mappings.

 

In the method below add all custom logic and make sure that strMessage contains the right message that needs to be returned.

 

MethodAndroid

 

 

Public Function MethodAndroid(ByVal strConnectionString As String, strIDs As String, strScannerName As String, intVBPID As Integer, intVBPAndroidMessageId as integer, intUserId as integer,Byref strReturnMessage as string, Optional strPrompt As String = "") as String Implements Interfaces.IScript.MethodAndroid

    Dim strMessage As String = "Result from Processing in VBP"

     ‘Add custom logic here

    '***** It is necessary to update the VBP_ANDROID_MESSAGE to display the message on the ANDROID client.

    Using dbConnect As New System.Data.SqlClient.SqlConnection(strConnectionString)

        dbConnect.Open()

        Dim dbCmd As New System.Data.SqlClient.SqlCommand("", dbConnect)

        Dim dbSelect As New System.Data.SqlClient.SqlDataAdapter(dbCmd)

        dbCmd.CommandText = "UPDATE VBP_ANDROID_MESSAGE Set MESSAGE_REPLY = '" & strMessage & "' , AUDIT_ACTION = 'U', AUDIT_APP_USER_ID = " & intUserId & ", AUDIT_TIME = '" & Format(Now(), "dd MMMM yyyy HH:mm:ss") & "' WHERE ID = " & intVBPAndroidMessageId

        dbCmd.ExecuteNonQuery()

        dbConnect.Dispose()

    End Using

Return ""

End Function