Welcome to Huawei's challenge at Junction 2021!
You have a bunch of fresh ideas and you aspire to make them possible with the help of the Huawei Mobile Services (HMS). We feel your enthusiasm - that's why we prepared this React Native starter project that will allow you to start coding immediately and avoid time consuming configuration steps. The project is designed for Android devices only.
- fork/clone this project
- visit the workshop Discord channel Junction 21 Hackathon Huawei
- look for the file with secrets (direct link )
- unzip the file into the project's android directory
- start coding!
Yes!! The starter project is a React Native skeleton app that:
- has the main HMS Kits added as dependencies
- has all relevant permissions added to the Android manifest
- connects to a shared account on App Gallery which needed by the majority of the HMS Kits
- when started, you can tap on "Check HMS status" to do a check if everything is properly configured
The file with secrets is the link between the starter project and the shared account. It contains:
- the
agconnect-services.json
configuration file - the signing configuration needed to authenticate this app to use HMS services
- Add SDK location in local.properties if needed
- Go to your Project -> Android
- Open the file local.properties
- Paste your Android SDK path depending on the operating system:
- Windows
sdk.dir = C:/Users/USERNAME/AppData/Local/Android/sdk
- Linux or MacOS
sdk.dir = /home/USERNAME/Android/sdk
Replace USERNAME with your user name
-
It is highly recommmended to use yarn to install package instead of npm:
yarn
-
then run the app
npx react-native run-android
There are solutions.
- If you're participating on-site, ask for a test device at the Huawei booth
- Download and temporary install HMS Core on your own Android device from here
- Cloud Debugging : this requires you to actually own/create a Huawei Developer account, but once that's done, you can just download the HMS Toolkit Android Studio plugin and access physical devices in the cloud
-
for Native Android: https://github.com/Huawei-Nordic/Junction2021_native
-
for Flutter: https://github.com/Huawei-Nordic/junction2021_flutterx
-
for Unity: https://github.com/DimitriUK/Junction-21-Huawei-Example
More HMS code samples:
Add more Huawei React Native plugins:
- https://developer.huawei.com/consumer/en/doc/development/HMS-Plugin-Guides/rn-intro-0000001050975015
Happy hacking!