D dragonguy Active Member Licensed User Longtime User Dec 27, 2018 #1 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! Code: 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 Code: 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 Code: 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: Code: Allow paid_candy dont know what candy is secret dont know what candy is
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! Code: 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 Code: 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 Code: 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: Code: Allow paid_candy dont know what candy is secret dont know what candy is
Erel B4X founder Staff member Licensed User Longtime User Dec 28, 2018 #2 Might be related to the device user. Test it on a device with a different user account. Your code looks correct. Upvote 0
Might be related to the device user. Test it on a device with a different user account. Your code looks correct.