This solution will guide you in developing and deploying android application using the Algorand blockchain features that addresses the following use case:
-
Account creation
-
Funding accounts
-
Transferring funds
-
Getting account transactions
-
Stateful and Stateless smart contract
The sample application here was done following Kotlin\Android development best practice, using MVVM and Couroutines for handling background task.
Link to the demo video: https://github.com/gconnect/AlgorandAndroidWallet/blob/master/demo_app.mp4
-
Android studio setup
-
Familiarity with the Java and Kotlin programming language and its use within the Android Environment.
-
Basic understanding of some blockchain terminologies.
This project was built following the MVVM design pattern. Below are some of the important libraries used:
- Algorand SDK
- Hilt
- Retrofit
- ViewModels and Coroutines
- Databinding
To get started, your android studio should be up and running. To get the code on your android studio, simply click the clone button to clone the project or download the the project. Then from Android studio click on file and select import to import the project from your local machine.
To install the app, here is the link to the apk KotlinAlgorandAndroidApp .
After installation. This is what happens once any of the buttons are clicked;
- Create account button : This will generate a new public key and Passphrase
- Recover account button : This will will recover an existing account. For the purpose of this example a default recovery account has been provided. You can change it in the code as you deem fit.
- Dashboard button : This will take you to the dashboard screen. This screen makes use of the recovery account. The dashboard displays the account balance and transactions of the recovery account. Also on the dashboard you can interact with the buttons to send and receive algo. You can also copy the address/public key using the copy icon.
- Stateful Smart Contract : This is will take you to the stateful smart contract page and each of the buttons on the page will display the output on a textview and also on the console.
- Stateless Smart Contract :This is will take you to the stateless smart contract page and each of the buttons on the page will display the output on a textview and also on the console.
Distributed under the MIT License. See LICENSE for more information.
For more details you can checkout the blog post here and the video tutorial here .
This project is not audited and should not be used in a production environment.