Android Question Error: IAB helper is not set up

tsteward

Well-Known Member
Licensed User
Longtime User
I keep getting this error in my app so i'm obviously doing something wrong.
IAB helper is not set up. Can't perform operation: launchPurchaseFlow

I have it set up in the Starter service like this:
B4X:
Sub Service_Create
    Dim publicKey As String
    publicKey = "xxxx......"
    SubManager.Initialize("SubManager", publicKey)
    SubManager.DebugLogging = True
End Sub

Sub SubManager_BillingSupported (Supported As Boolean, Message As String)
    If Supported Then
        SubManager.GetOwnedProducts
    End If
End Sub

Sub SubManager_OwnedProducts (Success As Boolean, purchases As Map)
    If Success Then
        If purchases.ContainsKey("laraplus") Or purchases.ContainsKey("laraplus1") Then
            AppSubscription = True
            'test_1 = "DAT33"
        Else
            AppSubscription = False
            'test_1 = "DAT12"
        End If
    Else

    End If
End Sub

Sub SubManager_PurchaseCompleted (Success As Boolean, Product As Purchase)
    If Success Then
        SubManager.GetOwnedProducts
    End If
End Sub
 
Top