Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learning Android Google Maps

You're reading from   Learning Android Google Maps Integrate Google Maps with your Android application to offer feature-rich and interactive maps

Arrow left icon
Product type Paperback
Published in Sep 2015
Publisher Packt
ISBN-13 9781849698863
Length 356 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (13) Chapters Close

Preface 1. Setting Up the Development Environment 2. Configuring an API Key and Creating Our First Map Application FREE CHAPTER 3. Working with Different Map Types 4. Adding Information to Maps 5. Interacting with a Map 6. Working with Custom Views 7. Working with Location Data 8. Know about the Street View 9. Google Maps Intents 10. Creating a Custom Map Application A. Answers to Self-test Questions Index

Additional helpful stuff

Let's see some things that will help in app development such as ADB, configuring the Java environment variable, and API levels.

Using Android Debug Bridge

Android Debug Bridge (ADB) is an inbuilt command-line tool, which helps us communicate with our virtual device or physical device.

The ADB tool can be found within our SDK directory. It is available at sdk | platform-tools.

Ubuntu users can easily install ADB by using the following command and directly accessing ADB from the command line:

sudo apt-get install android-tools-adb

To access ADB from any directory, if you are using older versions, you need to export the path of the adb directory. It can be done by using the following command:

export PATH=${PATH}:/home/rajamalw/sdk/platform-tools/

Here, I have given the path of my adb directory. To validate it for all the terminal sessions, you can add this line in the .bashrc file located in your home directory.

For detailed information on ADB, refer to the official documentation at http://developer.android.com/tools/help/adb.html.

Let's see some of the adb commands we mostly use:

adb devices

This command displays all the devices that are attached to your PC. It would return an output similar to the following:

List of devices attached 
ZX1B325BRZ      device

To work with your own physical device, you must enable the USB Debugging option in the Developer options.

To install an APK on my device via ADB, I used the following command. Replace myappname with the name of the APK:

adb install myappname.apk

The following adb command can be used to copy the image.png file from the SD card to your PC:

adb pull /sdcard/image.png

The following command can be used to copy the image.png file from your PC to the root of your SD card:

adb push image.png /sdcard/

The following is the most important command for Android developers, which helps them to debug the app, and to know why and when it is crashing. This displays the logs from the device. The IDE shows the logcat messages too, both in Android Studio and Eclipse with the ADT plugin:

adb logcat

The following command lands you in the shell using which you can execute some common Linux commands on your device:

adb shell

Configuring JAVA environment variables

While starting Android Studio, you may get a JAVA_HOME is not set error. Let me show you how to fix this error.

  1. Open Control Panel and select System.
  2. Then, go to System protection | Advanced | Environment Variables... | System variables.
  3. Then, create a new variable and provide a variable name as JAVA_HOME and a variable value as a path to your Java installation.

Android API levels

This is just for reference and to give you an idea about API levels. Each API level corresponds to each framework revision of Android, starting from API level 1 to API level 22. Android Lollipop 5.1, which is the latest API level, corresponds to API level 22. KitKat 4.4 corresponds to API level 19, while Gingerbread corresponds to API level 8 and 9.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image