This repository shows how to use Huawei or Google services for Maps, Location and Analytics 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.
- Create application, define application id (package).
- Enable Analytics in application.
- Provide
SHA-256
of signing keys. - Download
agconnect-services.json
and put in inapp/src/huawei/
- If you use Huawei device for tests - make sure, that
Huawei Mobile Services
updated to latest version. - If you use non Huawei device - install
Huawei Mobile Services
APK fromHuawei App Gallery
. Provide system permissions for it. In that case you could use analytics feature and location feature, but maps won't work.
- 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 inapp/
- Go to Google Cloud Console, find you project, created automatically in step 2.
- Find key for MapKit. Put in instead of
PROVIDE HERE YOU GOOGLE API KEY FOR MAPS FROM GOOGLE CLOUD CONSOLE
inapp/src/google/AndroidManifest.xml
- Make sure, that you have
Google Mobile Services
installed and enabled on you device.
Choose one of flavor huawei
or google
and see how it works!
Huawei and Google maps with markers: