Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Android Google Maps
  • Table Of Contents Toc
Learning Android Google Maps

Learning Android Google Maps

By : Raj Amal
5 (2)
close
close
Learning Android Google Maps

Learning Android Google Maps

5 (2)
By: Raj Amal

Overview of this book

This book helps you to overcome the most common problems faced by users and helps you create a successful map application without any hassle. The book starts with a brief description of how to set up an environment and obtain an API key to create your map application. This book will teach you about adding markers, overlays, and information windows to the map in detail. You will then dive deep into customizing various types of maps and working with location data and Google Street view. By the end of this book, you will be able to create succinct map applications in Android using Google maps efficiently.
Table of Contents (13 chapters)
close
close
12
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.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Android Google Maps
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon