Android Question Inapp Billing v5 - How to get subscription Price?


Licensed User
Longtime User

I have followed the instructions on Erel's billing v5 topic and here for subscription specific instructions.

This code gets the offer's details :

Dim offers As List = SkuDetails.Get(0).As(JavaObject).RunMethod("getSubscriptionOfferDetails", Null)
Dim offer As JavaObject = offers.Get(0)
Log(offer.RunMethod("getOfferToken", Null))
Log(offer.RunMethod("getOfferTags", Null))
Log(offer.RunMethod("getPricingPhases", Null))

Last line returns something like this: com.andr[email protected]

How can I get the price of the subscription in local currency ?

As decribed here we need to use getformattedprice() after querying for the getPricingPhases. but I couldn't understand how to do it.
Related stackoverflow topic is here

It was like this before v5 :

Public Sub GetAllProductPrice
    'make sure that the store service is connected
    Wait For (billing.ConnectIfNeeded) Billing_Connected (Result As BillingResult)
    If Result.IsSuccess Then
        'get the sku details
        Dim sf As Object = billing.QuerySkuDetails("subs", Array("pro"))
        Wait For (sf) Billing_SkuQueryCompleted (Result As BillingResult, SkuDetailsList As List)
        If Result.IsSuccess And SkuDetailsList.Size > 0 Then
            Dim mp As Map
            For Each Sku As SkuDetails In SkuDetailsList
                mp.Put(Sku.Sku, Sku.Price)
'                LogColor("SKU-Preis= " & Sku.Price,Colors.yellow)
                Main.urunfiyat="Aboneliği Başlat (" & Sku.Price&" / ay)"
        End If

    End If
End Sub
Last edited: