Is it my code is correct? I test license checking with phone didn't buy the app from google play but result return Allow. The phone can use my app without buy from google. I already test two phones, all phone return result allow. That is not right.
Please help me! Thanks!
Log:
Please help me! Thanks!
B4X:
Sub Process_Globals
Dim publicKey As String
publicKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Dim paid_candy As String
Dim secret_1 As String=""
secret_1="dont know what candy is"
End Sub
B4X:
Sub Activity_Create(FirstTime As Boolean)
Dim lc As LicenseChecker
Dim P As Phone
lc.Initialize("lc", P.GetSettings("android_id"), publicKey, "qwerty".GetBytes("UTF8"))
lc.SetVariableAndValue("paid_candy", secret_1)
lc.CheckAccess
End Sub
B4X:
Sub lc_Allow
Log("Allow")
Log("paid_candy " & paid_candy)
Log("secret " & secret_1)
If paid_candy <> secret_1 Then
ExitApplication
End If
End Sub
Sub lc_DontAllow
Log("Dont Allow")
ExitApplication
End Sub
Sub lc_Error (ErrorCode As String)
Log("lc_Error error: " & ErrorCode)
ExitApplication
End Sub
Log:
B4X:
Allow
paid_candy dont know what candy is
secret dont know what candy is