Hi,
This is my sample code. Would you help me ? Thanks !
//------------------------------
#Region Module Attributes
#FullScreen: False
#IncludeTitle: True
#ApplicationLabel: Sample Code
#VersionCode: 16
#VersionName:
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#End Region
'Activity module
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim server As ServerSocket 'Add a reference to the network library
Dim networkOK As Int
'License Lib Use
Dim public_Key As String
public_Key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnOV9SgrW9iEFckScwAmVKW/1sJk+AYATodloVK+HWsOOYt0QWmizBOIGDrnlKj16F7VhWyqtHim6h4IRDWDLbfuX41guH5cDy6Mzeo1lHS/GJ2n9CMO5JDiUmgdAHvkZSRY7CUz+rHIDNKWfmyQGkSmSIcdAXI1e0PGg5jo7jwWVCdnf5YCwkbRGcxboOq1kK1Ysxv6+DMseR/HWnTzk65L/P7havhOml1ua9xWWtBKAUHVr+x2j6GWsEeTHJ/XqgmLt5SrYu9psPvmipLAGETGngA+X+8Km9hci3FG47MaIf/ya3BKn1QF7LONt96+KYDrN+C+HuiMK2145BzgUiQIDAQAB"
Dim sc_vvv1 As String
Dim pc_vvv1 As String
pc_vvv1 = "adg135piy"
Dim to_vvv1 As Boolean
' Test Only Flag
to_vvv1 = False
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("loMain")
Activity.Title = "Sample Code"
' to_vvv1 = True
' Dim server As ServerSocket 'Add a reference to the network library
server.Initialize(0, "")
networkOK = 1 ' 1 is OK , 0 is failure
If server.GetMyIP = "127.0.0.1" Then 'this is the local host address
networkOK = 0
End If
' License Check
If FirstTime Then
Log("Check Market")
Dim lc_vvv1 As LicenseChecker
Dim p As PhoneId
Dim kljdflkf_88 As String
Dim pk_vvv1 As String
pk_vvv1 = public_Key
lc_vvv1.Initialize("lc_vvv1", p.GetDeviceId, pk_vvv1, "kljdflkf_88".GetBytes("UTF8"))
lc_vvv1.SetVariableAndValue("sc_vvv1", pc_vvv1 )
If to_vvv1 = False Then
lc_vvv1.CheckAccess
End If
End If
' End License
If to_vvv1 = True Then
sc_vvv1 = pc_vvv1
End If
End Sub
Sub lc_vvv1_Allow
Log("Allow !")
End Sub
Sub lc_vvv1_DontAllow
Log("DontAllow !")
ToastMessageShow("??? !", True)
Activity.Finish
End Sub
Sub lc_vvv1_Error (ErrorCode As String)
Log("error: " & ErrorCode)
ToastMessageShow("???", True)
Activity.Finish
End Sub
Sub Activity_Resume
server.Initialize(0, "")
networkOK = 1
If server.GetMyIP = "127.0.0.1" Then 'this is the local host address
'no connection
networkOK = 0
End If
If networkOK == 1 Then
Dim lc_vvv1 As LicenseChecker
Dim p As PhoneId
Dim kljdflkf_88 As String
Dim pk_vvv1 As String
pk_vvv1 = public_Key
lc_vvv1.Initialize("lc_vvv1", p.GetDeviceId, pk_vvv1, "kljdflkf_88".GetBytes("UTF8"))
lc_vvv1.SetVariableAndValue("sc_vvv1", pc_vvv1 )
If to_vvv1 = False Then
lc_vvv1.CheckAccess
End If
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
If ( UserClosed = True ) Then
ExitApplication
End If
End Sub
Sub ButtonGo_Click
If ( ( networkOK == 1 ) AND ( sc_vvv1 == pc_vvv1 ) ) Then
StartActivity( Agree )
Else
Msgbox("????","Error")
End If
End Sub
// --------------------------------------------
In which way doesn't it work? If you are using SetVariableValue then you should make sure that the variable includes an underscore. See the first post.