Hi all. Just to let you know I’ve added significant amounts of code to our example project.
What does it do?
FlareNetMessenger is an Android application that allows the user to send short messages between Flare test-net addresses. Currently, it’s hardcoded to use a smart contract I have deployed (the code for this is included, so if you want to hack around with it feel free) which handles users’ inboxes, sending messages, receiving messages, checking if a user is “registered” etc.
How to use it?
- Generate one or more wallets on and credit the 500 test-FXRP to them on Coston (flare’s test-net) by following the tutorial at https://github.com/flare-eng/coston/
- Next, build and compile the android app in Android Studio.
- Make a note of the private keys you generated by following the Coston tutorial. Go to https://qr-code-generator.com and paste your private keys here.
- Open the app and go to “settings” and you tap the envelope icon in the bottom right corner to get a QR code scanner, scan the QR code from the previous step. You’ve now imported your first Coston wallet.
- Import one or more other wallets.
- You can now navigate back to the main page. When you select a wallet, it will be enrolled with the smart contract to enable sending/receiving messages. You can enroll one or more wallets, if you have two phones then add and enroll a wallet on each phone.
- Select the Coston address you want to send a message to and hit send.
- Check in the other wallet (either on the same phone by switching wallets or by using your second phone)
- You’ve now sent and received your first smart-contract based SMS.
Future ideas / improvements:
- Make this a “fully-fledged” wallet allowing to send FXRP on the testnet (and later the mainnet)
- Stop doing network stuff on the main thread (its only like this for rapid development purposes this will change in the future.
- Periodic checking for new messages and optional audio alerts.
- Creation of an “oracle” allowing sending messages to actuall mobile phone numbers.
- Implement a ContactsContract so you can associate XRP addresses with contacts on your phone.
Download / Git Clone: