Push Notifications Android
This repository shows how to use Huawei or Google services for Push-notification in different flavors.
Preparations
You need to create accounts in Huawei and Google, enable services in developer console and get config files and keys.
Huawei
- 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
app
folder; - 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
app
folder; - Make sure, that you have Google Mobile Services installed and enabled on you device.
Unsplash
- Create developer account on Unsplash;
- Get Access-token from Unsplash and put in variable
api.unsplash.access_token
onlocal.properties
.
Launch and Priority
Choose one of flavor universal
or 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.