This is sample code on how to use WalletKit NFC capabilities. You can realize the function of NFC card swiping ability through sample code.
Before running the demo code, you should have installed Java and Maven.
Oracle Java 1.8 is recommended.
PassesController is a unified entry class, which defines the interfaces that need to be implemented.
-
Registration interface You can register and obtain the three-party authentication and authorization certificate by calling the register interface.
-
Apply for a personalized token You can implement the requestToken method to apply for a personalized token.
-
Get personalized data You can transfer personalized data through the getPersonalInfo interface.
-
Unregister When the wallet deletes the card, it will call this interface to inform you that the card has been deleted.
If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.
If you have questions about how to use HMS samples, try the following options:
- Stack Overflow is the best place for any programming questions. Be sure to tag your question with
huawei-mobile-services
. - Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.
If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.
HMS wallet server sample code is licensed under the Apache License, version 2.0.