This repository shows how to use Huawei or Google services for Push-notification in different flavors.
You need to create accounts in Huawei and Google, enable services in developer console and get config files and keys.
- Create developer account on App Gallery Connect;
- Create application, define application id (package);
- Enable Push in App Gallery Connect for Project;
- Provide SHA-256 of signing keys;
- Download agconnect-services.json and put in
- If you use Huawei device for tests – make sure, that Huawei Mobile Services updated to latest version.
- Create Google and Firebase accounts;
- Create project in Firebase;
- Add android application in Firebase. Provide SHA-1 of signing keys;
- Download google-services.json and put in
- Make sure, that you have Google Mobile Services installed and enabled on you device.
- Create developer account on Unsplash;
- Get Access-token from Unsplash and put in variable
Launch and Priority
Choose one of flavor
gms and see how it works!
Gms assembly is suitable for distribution on Google Play (work only GMS). Universal assembly is suitable for distribution on App Gallery (work with GMS and HMS).
Warning: If the device has HMS and GMS, then GMS is used in priority.