Secure data stored in a variable

I am making a educational app which provides free and paid courses based on subscription. I am storing course details like price in variable.
I have to change button text to “Pay now” if paid course or “Download Material” if free.
Is these value in a variable can be edited by apk editing tools? If yes paid courses can be availed by changing value…

Please suggest me a method for overcome it…

i think it will helpful for you try it…

Friend, you need to store these values ​​in a database.
And so, with another app or a website, you can adjust the values ​​of the database. Within your app, you will log according to the values ​​returned from the database.