Android Question Conditional Symbols and Google In-App Deployment

mred1

Member
Licensed User
Longtime User
I love B4A and have been working on my first complex app for over 2 years now. It uses Build Configurations with Conditional Symbols for several different versions. The program has ads for some versions and not for others based upon the Conditional Symbol name (#Copper #Silver #Gold…). My application utilizes a database which also uses both portrait and landscape design so that it will work with 10’s of thousands of devices while looking properly.

I wrote the above paragraph hopefully to relay the fact that I work hard to understand my problems while using B4A resources to resolve them. I am presently at a great impasse in which I feel that many others have as well, which I feel may be a relatively simple answer.

I have an application that I can install to any one of many of my phones and tablets for the Conditional Symbol name versions (##Copper #Silver #Gold …) which work properly with or without ads, and with enhancements based upon the version numbers that I compile locally on my devices.

I am very much misunderstanding what I need to do both in my code so that I can upload a SINGLE named .apk file to Google Play in order to make this in-app purchase application work.

I very much thank anyone helping me understand this in advance.
 

Roycefer

Well-Known Member
Licensed User
Longtime User
Conditional Symbols are a compile-time feature. If someone downloads and installs Copper.apk, they won't have the code for Silver or Gold in the app. The Silver and Gold Regions weren't compiled when Copper.apk was compiled.

It sounds like what you need are run-time checks for copper status, etc..., not conditional compilation. My recommendation is that you follow the in-app billing tutorial and handle the
B4X:
Sub manager_PurchaseCompleted (Success As Boolean, Product As Purchase)
event. Use the arguments from that event to update the Copper/Silver/Gold status of the app.
 
Upvote 0

mred1

Member
Licensed User
Longtime User
Thank you so much Roycefer. I was heading down this road in my mind yet needed someone to illustrate my mistake nicely like you did. Thanks again.
 
Upvote 0
Top