Hi all. I have a few problem with in-app.
This is code:
Play Store - I call TextXX in code: (Productid="TestXX")
When i try dont work i have this message:
Where i wrong ??
Thank you all
This is code:
B4X:
#Region Project Attributes
#ApplicationLabel: Esempio In-App
#VersionCode: 3
#VersionName: 1.01
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim manager As BillingManager3
Private key As String = "MIIBIjANBgkqhkiG9w0BA......."
Dim Productid As String
Dim Producttype As String
Dim DeveloperPayload As String
DeveloperPayload="Esempio In-App" ' ---> Name of my App "
Producttype="inapp" ' ---> this is an input
Productid="TestXX" ' ---> this is an input I it is the product id i defined in the store
End Sub
Sub Globals
Dim button1, button2 As Button
Dim label1 As Label
Dim ImageView1 As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime = True Then
manager.Initialize("manager", key)
End If
manager.DebugLogging = True
Activity.LoadLayout("Main")'
End Sub
Sub Manager_BillingSupported (Supported As Boolean, Message As String)
Log(Supported & ", " & Message)
Log("Subscriptions supported: " & manager.SubscriptionsSupported)
If Supported Then
manager.GetOwnedProducts
End If
End Sub
Sub manager_OwnedProducts (Success As Boolean, purchases As Map)
Log(Success)
If Success Then
label1.Visible = True
button2.Visible = True
Log(purchases)
For Each p As Purchase In purchases.Values
Log(p.Productid & ", Purchased? " & (p.PurchaseState = p.STATE_PURCHASED))
Next
End If
End Sub
Sub button1_click
manager.RequestPayment(Productid, Producttype, DeveloperPayload)
End Sub
Public Sub manager_PurchaseCompleted (Success As Boolean, Product As Purchase)
If Success = True Then
Select Product.Productid
Case "TestXX"
'qui inserisco cosa fare nel caso la transazione si andata a buon fine
' Faccio andare nella routine esempio sub lancia dove elimino la pubblicità
ToastMessageShow("PLAY STORE OK Buy ;);)))))!!", False)
End Select
Else
ToastMessageShow("PLAY STORE Error Buy", False)
End If
End Sub
Sub button2_click
Msgbox("Bene","Messaggio")
End Sub
Play Store - I call TextXX in code: (Productid="TestXX")
When i try dont work i have this message:
Where i wrong ??
Thank you all