CFSaver — Application that integrating with Location Kit and Map Kit

Hendry Gunawan
3 min readJul 15, 2021

--

Introduction

Hello Everyone,

In the article, we will diccuss about CFSaver Application. CFSaver is an application that created using Location Kit and Map Kit. This application will allow you to save your latest cash flow along with its location. You can also view the location that you save on the map to get more detail information about it. First, we have to input manually the information about the cash flow such as the title, date, cash flow type, total transaction and the location. After that, it will be save in the local database (SQLite) and will show in the home.

Project Setup

Firstly, you need a Huawei Developer account and add an app in Projects in AppGallery Connect console. After that you can activate the Map and Location kits and use them in your app.

If you don’t have an Huawei Developer account, please visit the link below to get more detail information.

https://developer.huawei.com/consumer/en/doc/start/registration-and-verification-0000001053628148

And you want to know more about how to enable map kit and location kit in the AppGallery Connect console, please visit the link below.

https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-get-started#h1-1587521853252

In other for the App to work properly, we need to follow some step :

  • Add some implementation in build.gradle (:app).
  • Add some permission the AndroidManifest.xml.
  • To get the user current location, we have to check the for its permission.
  • After that, we need some line of codes in order for the app to get the location such as latitude and longitude.
  • Then, we need to set the API key in Map Activity and Set the map for the app to show the location on the map base on latitude and longitude.

Conclusion

For the conclusion, we had created a Huawei apps that using location kit and map kit. You can use location kit to get your current location, map kit to show the location in the map and a simple marker to mark the location in the map.

References

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-sdk-introduction-0000001061991291

https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/introduction-0000001050706106

--

--