- 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.
- OpenStack Cloud Computing Cookbook(Third Edition)
- 自己動(dòng)手寫搜索引擎
- Getting Started with React
- Visual Basic編程:從基礎(chǔ)到實(shí)踐(第2版)
- 三維圖形化C++趣味編程
- 程序員考試案例梳理、真題透解與強(qiáng)化訓(xùn)練
- SQL基礎(chǔ)教程(視頻教學(xué)版)
- WebRTC技術(shù)詳解:從0到1構(gòu)建多人視頻會(huì)議系統(tǒng)
- 微信小程序入門指南
- Python數(shù)據(jù)結(jié)構(gòu)與算法(視頻教學(xué)版)
- Learning Continuous Integration with TeamCity
- 新一代SDN:VMware NSX 網(wǎng)絡(luò)原理與實(shí)踐
- Unity 3D腳本編程:使用C#語言開發(fā)跨平臺(tái)游戲
- PHP 7從零基礎(chǔ)到項(xiàng)目實(shí)戰(zhàn)
- Visual Basic程序設(shè)計(jì)(第三版)