Coins store example

Hello everyone,
i made this example because i see some users who want this in her apps.

That’s a very clean example to show you how a coints store works.
In this example i don’t use a storage because it’s only a demonstration how it works.
For games and other apps is a tinydb very usefull to store the number of coints and buyed features.

You have 100 Coints. Every Feature in this example needs 75 coints to be available.
If you restart the app the number of coints get back to 100.

Screenshots:


[Download Coins_Store_Example (aia file)](https://sourceforge.net/projects/released/files/Coins_Store_Example.aia/download) [Download Coins_Store_Example (apk file)](https://sourceforge.net/projects/released/files/Coins_Store_Example.apk/download) [Example on my blog](http://nmd-apps.jimdo.com/tutorials-1/snippets/#27)
best regards, Mika

Tutorials, Snippets, Examples with source files (aia and apk) and much more available on my blog

4 Likes

THANK YOU
So if I want the user to keep their “coins” all I have to do is set up a name for tinybd?

1 Like

Yes. You must safe the number of coints in a tiny db and load the value of it when you open the app.
You must also store the paid features.

In the example has the global variable of feature 1 after the paying process a “1”.
You can store that value in a tinydb after the user paid it.
and when the user opens the app you must load it from the tiny db

3 Likes