- Expert Android Programming
- Prajyot Mainkar
- 199字
- 2021-07-08 10:29:11
Google Maps
Google Maps is used in the app for finding the location of a place, or to navigate you to that place. Integrating Google Maps in the app is simple; check out the steps below:
First we need to enable the Google Maps API from the Developer Console link: https://console.cloud.google.com. In your project page select Library; then, under Google Maps APIs, select Google Maps Android API:

Next, enable the API so that it can be used in our application. After the Google Maps API is enabled, we need to start integrating it into our app:

In Android studio create a new Google Maps Activity:

After the activity is created, we need to create an API key from the developer console:

Go to the credentials section in the developer console, and create a new API key:

Here, select Android app and enter your app's package name and Sha-1 certificate. After saving the API key, use the key in your app.
Now in your app, add the dependency in your app's build.gradle file:
Compile com.google.android.gms:play-services-maps:10.0.1.
Create a string resource google_maps_key strings.xml with the value of the API key. Save the file.
After adding, save the AndroidManifest.xml and re-build your application.
- LabVIEW 2018 虛擬儀器程序設計
- DevOps with Kubernetes
- Learning Spring 5.0
- Three.js開發(fā)指南:基于WebGL和HTML5在網(wǎng)頁上渲染3D圖形和動畫(原書第3版)
- C和C++安全編碼(原書第2版)
- 零基礎學Python網(wǎng)絡爬蟲案例實戰(zhàn)全流程詳解(高級進階篇)
- 深入理解Elasticsearch(原書第3版)
- Linux:Embedded Development
- Python圖形化編程(微課版)
- Illustrator CC平面設計實戰(zhàn)從入門到精通(視頻自學全彩版)
- Flink技術內(nèi)幕:架構設計與實現(xiàn)原理
- Data Science Algorithms in a Week
- Angular Design Patterns
- Visual Basic程序設計基礎
- 深入淺出 HTTPS:從原理到實戰(zhàn)