Android Question Google rejected app for not showing subscription price - but it does for me?

tsteward

Well-Known Member
Licensed User
Longtime User
Had my latest update for my app rejected as it is misleading not showing price for subs.


What I don't understand is on my phone it clearly does.
Any suggestions as to why this might be?


 

asales

Expert
Licensed User
Longtime User
I found and installed your app.
When I click in the subscription I don't see the prices and I need to click in the Buy button to see the prices.
I think you need to review your code to check why the price are not showing when the subscription screen are opened.

 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
This is the code that fills the subs page.

B4X:
Public Sub GetAllProductPrice
    '************* GOOGLE PLAY STORE ******************
    'make sure that the store service is connected
    Starter.myLog.Add($"(GetAllProductPrice) Getting Prices from PS"$)
    Wait For (Starter.billing.ConnectIfNeeded) Billing_Connected (Result As BillingResult)
    If Result.IsSuccess Then
        'get the sku details
        Starter.myLog.Add($"(GetAllProductPrice) Connected to PS Result - ${Result.ResponseCodeString}"$)
        Dim sf As Object = Starter.billing.QuerySkuDetails("subs", Array(Starter.ADS_SDK_ID4,Starter.ADS_SDK_ID5))
        Wait For (sf) Billing_SkuQueryCompleted (Result As BillingResult, SkuDetailsList As List)
        Starter.myLog.Add($"(GetAllProductPrice) Info received from PS Result - ${Result.ResponseCodeString}"$)
        If Result.IsSuccess And SkuDetailsList.Size > 0 Then
            clvSubscribe.Clear
            For Each Sku As SkuDetails In SkuDetailsList
                Dim sPrice As String
                If Sku.Price = "" Then
                    Dim offers As List = Sku.As(JavaObject).RunMethod("getSubscriptionOfferDetails", Null)
                    Dim offer As JavaObject = offers.Get(0)
                    Dim PricingPhases As JavaObject
                    PricingPhases = offer.RunMethod("getPricingPhases", Null)
                    Dim l As List = PricingPhases.RunMethod("getPricingPhaseList", Null)
                    Dim PricingPhase As JavaObject
                    PricingPhase = l.Get(0)
                    sPrice = PricingPhase.RunMethod("getFormattedPrice", Null)
                Else
                    sPrice = Sku.Price
                End If
                Dim p As B4XView = xui.CreatePanel("")
                p.SetLayoutAnimated(0, 0, 0, clvSubscribe.AsView.Width, 200dip)
                p.LoadLayout("subsrowlayout")
                Dim mydesc As String = ""
                If Sku.Sku = "lara202312" Then
                    clvSubsItemTitle.Text = B4XPages.MainPage.loc.Localize("LARA 12 Month Subscription")
                    mydesc = Sku.Description & CRLF & CRLF & "Free Trial - Cancel subscription withing 7 days and there will be no charge"
                End If
                If Sku.Sku = "lara202306" Then
                    clvSubsItemTitle.Text = B4XPages.MainPage.loc.Localize("LARA 6 Month Subscription")
                    mydesc = Sku.Description & CRLF & CRLF & "Free Trial - Cancel subscription withing 7 days and there will be no charge"
                End If
                If Starter.SKU_Purchased = Sku.Sku Then
                    clvSubsItemAmount.Text = B4XPages.MainPage.loc.Localize("Active")
                    clvSubsItemButton.Text = B4XPages.MainPage.loc.Localize("Cancel")
                    mydesc = Sku.Description & CRLF & CRLF & Starter.productID & CRLF & DateTime.Date(Starter.purchaseTime) & " - " & DateTime.Time(Starter.purchaseTime)
                Else
                    clvSubsItemAmount.Text = sPrice
                    clvSubsItemButton.Text = B4XPages.MainPage.loc.Localize("Buy")
                    If Main.AppSubscriptionActive = True Then
                        clvSubsItemButton.Enabled = False
                    End If
                End If
                clvSubsItemDesc.Text = mydesc
                clvSubscribe.Add(p,Sku.Title)
            Next
            clvSubscribe.AsView.Visible = True
        else if Result.ResponseCodeString = "FEATURE_NOT_SUPPORTED" Then
            xui.MsgboxAsync($"Sorry your version of Google Play Store is not supported${CRLF}Result - ${Result.ResponseCodeString}"$, "Not Supported")
        End If
    Else
        xui.MsgboxAsync($"Unable to connect to Google Billing to check Subscription${CRLF}Check internet access${CRLF}Result - ${Result.ResponseCodeString}"$, "Can't Connect")
    End If
End Sub
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
so how can I trouble shoot this?
Maybe you should take a look at where the text for the price is set. Then you will see that it displays a text like in the picture above at @asales "B4XPages.MainPage.loc.Localize("Active")". So something is wrong with the following line Starter.SKU_Purchased = Sku.Sku
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
Please explain
you're pulling prices from Google subscription, right? Did you try to run your app on another phone?

Just installed your app - no prices.

Tried another phone - the same result.

I just installed the app, selected Sunscription (No registration made) - the same result.
 

Attachments

  • Screenshot_20240216_232012.jpg
    241.8 KB · Views: 84
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
Solved the problem by checking if sPrice was = to Free and if it was then I hard coded the prices.
Google passed this so issue solved. Although I do wish it worked properly getting the price from the app store and displaying it in the clients currency.

Oh well it will do for now.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…