This is a simple android application that emulates a lottery service, it allows to you create and configure your own lottery, and also join others lottery. To join a lottery, you have to buy a ticket, to do so you have to have "virtual coins" that you can purchase by watching ads; Beside that you can share the lotteries you join with friends and family.
Signing up using Google credentials to playCreates and configure your own lotteries, setting maximum tickets to purchase, countdown timer, private or not, etc...Buy lottery tickets, using "virtual coins" that you obtain by watching adsShare the lotteries with friends by sending to them a link with a specific lottery
Room DatabaseCoilAdmob
Exyte Animated Navigation BarGithub link
MVVM (Model - View - ViewModel) ArchitectureSigle AcitivySingle ViewModel
First, sign up using Google account.(In the meantime it only let you register using google credentials)
Click on purchase coins, you will have to watch until the end the video ad to receive the reward which is 1 coin. Remember, you will need 3 coins to purchase a lottery ticket.
Once you have 3 coins, you can either buy a ticket or create a new pool. remember, the last option creates a pool and also provides you with a ticket.
You can buy tickets as much as you want but it requires always 3 coins. Make sure purchase tickets before the timer countdown is over.
Once the timer countdown is over, the app will generate a randowm winning number, to check if your ticket number won, update ticket and you will see the result. If you won, click on claim prize button, this will make a request to the server and the "Admin" will send your prize, [This last option is theorically, because it depends of many things, such as number of tickets bought and the CPM (cost per mille) rates for AdMob ads videos, for example lets say CPM is 0.10 € per 1000 views, and the lottery pool sold 10.000 tickets, then your prize should be 0.10 * 10.000 = 1.00 €]
You can search by pool ID, and also you can share any pool with anyone by clicking on share button [Share symbol], this will generate a deep link, so anyone has the app installed can join the lottery.
You can update the ticket data from firebase cloud by clicking on update button, this will retrieve the last current data, also you can delete your ticket in case its an old ticket, when you delete a ticket you can't get again.
To use the app, you need to create your own firebase project and admob account, you have to follow a few steps:
Replace google-service.json file with new one, you can do this by following this:firebase tutorialReplace Admob app IDhereand ad unit IDhereFollow this:google tutorial













