MarcRubio / radixdlt-pos-android

Android point of sale app to accept payments via NFC cards using a RADIX Distributed Ledger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

License MIT

Radix DLT Android POS

This branch of Radix DLT Android POS release/1.0.0-beta is the start of what is to come from our future public BETANET release.

Watch the video

RadixDLT Point of Sale

The Radix DLT Android POS currently works with the BETANET universe and interacts with it by making full use of the latest release of the radixdlt-java under the release/1.0.0-beta branch.

     

Development setup

Use Android Studio 3.5 Preview (or newer) to be able to build the app.

Card Setup

In order to flash and use your own nfc cards, please see the radixdlt-card-applet project.

Cards and devices which will run this app must support extended length APDU format

The current implementation of the POS app is currently developed to listen to one type of token. This means that if a token has been created in the radix universe and this is the token that we want to accept, this must be set in the Constants.kt file for both the TOKEN_REFERENCE_ADDRESS and TOKEN_REFERENCE_SYMBOL constants.

Current values below work with the Radix Hosted Betanet node:

const val TOKEN_REFERENCE_ADDRESS = “9gktrzDLiwxDXSxcpV9PQEkBr59g5vrvRhoXC4YPBXnTi5hsRzg”
const val TOKEN_REFERENCE_SYMBOL = “USD”

POS App Setup

Bootstrap to your desired network by modifying the bootstrapConfig variable in the RadixPOSApplication.kt file.

The bootstrap variable will look like private val bootstrapConfig = BootStrapConfigAndroidImpl.macAndroidEmulator() where you can choose 3 options using the BootStrapConfigAndroidImpl.class.

The 3 options are:

  • BootStrapConfigAndroidImpl.radixBetanetNode() (Used when connecting to the hosted radix betanet node)

  • BootStrapConfigAndroidImpl.macAndroidEmulator() (Used when connecting to a running localnode on your mac and also running the android emulator)

  • BootStrapConfigAndroidImpl.localHost() (Can take a String argument)

    • By default it will try to connect to "localhost" which will connect to your android emulator running on your Windows PC. This function can also take an argument as a String and can be an IP address or URL.

    e.g.
    BootStrapConfigAndroidImpl.localHost("192.168.0.2") ("192.168.0.2" is the IP address given by the router to your computer to connect your physical android phone via LAN)
    or
    BootStrapConfigAndroidImpl.localHost("5.71.214.26") ("5.71.214.26"is the IP address given by your ISP and you can connect to it as long as port 8080 has been forwarded on your router)

Code style

This project uses ktlint via Gradle dependency. To check code style - gradle ktlint (it's also bound to gradle check).

Android development

Contribute

Contributions are welcome, we simply ask to:

  • Fork the codebase
  • Make changes
  • Submit a pull request for review

When contributing to this repository, we recommend discussing with the development team the change you wish to make using a GitHub issue before making changes.

Please follow our Code of Conduct in all your interactions with the project.

Links

Link Description
radixdlt.com Radix DLT Homepage
documentation Radix Knowledge Base
forum Radix Technical Forum
@radixdlt Follow Radix DLT on Twitter

Have a question?

If you need any information, please visit our GitHub Issues

License

Radix DLT Android POS is released under the MIT License.

About

Android point of sale app to accept payments via NFC cards using a RADIX Distributed Ledger

License:MIT License


Languages

Language:Kotlin 100.0%