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
Free Learning
Arrow right icon
Android Application Development with Maven
Android Application Development with Maven

Android Application Development with Maven: Learn how to use and configure Maven to support all phases of the development of an Android application

eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Android Application Development with Maven

Chapter 1. Beginning with the Basics

In this chapter, we will see how to download, install, and set up a development environment, including the essential elements: Java Development Kit (JDK), Apache Maven, Android SDK, and an Integrated Development Environment (IDE). There will be pictures and illustrations provided to help you progress as quickly as possible.

Throughout this work, we will assume that you have a basic knowledge of Java, system, Maven, and IDEs and are familiar with terms such as: compiler, environment variables, repository, plugin, goal, build, and so on.

Installing Java

Prior to anything else, download and install a JDK7 and optionally a Java Runtime Environment (JRE). Both of them are downloadable from the Oracle website: http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html. As a reminder, the JDK is a collection of tools needed to develop, compile, and monitor a Java application in the development state, whereas a JRE is needed to run a Java-compiled class or an archive. Keep in mind also that at the time this book was written, Android was not officially supporting JDK8 and that Oracle had already announced the end of public releases of JDK7. We hope that now that you read these lines, Android is compatible with the latest JDK. If not, then you should pick and install the latest available update of JDK7.

Set the environment variable JAVA_HOME to the right location, such as /var/opt/java or C:\win32app\jdk_1.7.X folder.

Then, add $JAVA_HOME/bin or %JAVA_HOME%\bin parameter to your PATH variable.

Check this by running the command java -version in a terminal. Here is an example of the expected output:

C:\>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode)

Download and Install Apache Maven

Download Maven 3.2.1 or greater from the Apache Maven website: http://maven.apache.org/download.cgi. Install this by uncompressing it in a folder of your choice. Set the environment variable M2_HOME to the right location, such as /usr/lib/maven/ or C:\win32app\apache-maven-3.2.1 folder.

Then, add $M2_HOME/bin or %M2_HOME%\bin parameter to your PATH variable. Check mvn setup is executable by running the command mvn -version . Here is an example of the expected output:

C:\win32app\Console-2.00.b148>mvn -version
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: C:\win32app\apache-maven-3.2.1
Java version: 1.7.0_45, vendor: Oracle CorporationJava home:
C:\win32app\jdk1.7.0_45\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"

Android SDK

Two ways exist to install the SDK: the former is faster but it hides several operations you should be aware of as an Android developer. The latter takes more time but it introduces you to the tools and concepts coming with the SDK. Besides, this allows you to customize your installation, such as the folders. If you are a beginner, we encourage you to follow the first approach. You can always tune Android SDK at a later time when you feel more confident and you are familiar with the available settings.

Android development tools

You can download and install the official Android Studio from the Android website: https://developer.android.com/sdk/index.html. Android Studio is a suite that includes an integrated development environment (Android IDE), based on IntelliJ IDEA, with Android SDK tools, as well as other stuff like an embedded emulator system image and platform tools.

For Windows users, after downloading the installer (.exe file), run it and just follow the instructions provided by the installer. You can keep the default values suggested if you are a beginner or if you are not sure how each setting affects the installation. When you're done, you can run Android Studio by clicking on the icon created by the installer.

For Linux users, unzip the file you downloaded to your favorite application directory. Then, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh command. Regardless of your operating system, always double-check before the installation that you have enough disk space. It varies from OS to OS.

Android SDK standalone

Alternately, if you already have an installed IDE or text editor, you can install the SDK manually. The following operations are long and tedious; however, any real Android developer should experience them at least once.

Download Android SDK from Android website: https://developer.android.com/sdk/index.html#Other. Again for Windows users, it is highly recommended to download the executable installer and follow the steps provided. Linux users can uncompress the downloaded zipped file to the folder of their choice, let's say /home/dev/android-sdk folder. In both cases, let's call the location where android SDK installed: ANDROID_HOME variable.

By default, the SDK has the following top-level directory tree:

Android SDK standalone

Let's explore and review the content of the starter SDK:

  • %ANDROID_HOME%\tools\: This folder gathers general utilities needed to develop, test, and debug an application.
  • %ANDROID_HOME%\platform-tools\: This folder contains other utilities, such as adb and fastboot, needed by developers to design, code, and debug an application on an actual device.
  • %ANDROID_HOME%\add-ons\: This folder is initially empty. It will be filled in later on, in order to provide support to call and use Google APIs, for instance the API allowing applications to communicate and display data from Google Maps.
  • %ANDROID_HOME%\AVD Manager.exe: This parameter allows us to manage the Android Virtual Devices (AVD), which are mere emulators. On first launch, no AVD is available. The following screenshot shows the Android Virtual Device Manager:
    Android SDK standalone

The AVD you will create later will be stored in your personal folder under the .android/avd path.

To launch the SDK manager, if you are a Windows user, run %ANDROID_HOME%\SDK Manager.exe command. If you are working on Linux, open a terminal and navigate to the tools/directory in the Android SDK and then execute:

android sdk.

In a first step like that shown in the following screenshot, install the packages suggested by the SDK Manager: SDK Tools, SDK Platform tools, the current API, and so on:

Android SDK standalone

At the time of writing, the last version of Android is 5.0.1 Lollipop. The API level is different from the grand public version: Lollipop corresponds to API 21, as well as Android KitKat 4.4.2 did to API 19, Android 4.0 / IceCreamSandwich did to API 17, or Android 2.3.X / Gingerbread to API 10, and so on.

Accept the license agreements as shown in the next screenshot, and let SDK Manager download. This may take a while for the default set of packages , and will take longer if you add other packages to the install list.

Android SDK standalone

Once this is done, the directory tree will change a lot. The different folders are filled in with the elements selected in the preceding screenshot, such as Google APIs, drivers, documentation, sources, build tools, and so on.

Creation of a new project

Now, we create a new, basic project. Often, you may prefer to do this within your IDE; anyway, creating a project with Maven and its artifacts and then importing the new project into the IDE are more elegant practice: this will ensure the project matches Android standards and is not IDE-dependent. Moreover, by default, creating an Android project in an IDE and then adding Maven support to this require some tricks and hacks.

The first step needs a bit of work: determining the platform.version properties of your Android install. Go to one among the installed platforms folder. If you have downloaded only the latest SDK version, then it should be in the ANDROID_HOME/platforms/android-21 folder. Open the file source.properties. Search for Platform.Version and Pkg.Revision properties. In the following sample file, the respective values are 4.4.2 and 3:

AndroidVersion.ApiLevel=21
Layoutlib.Api=12
Layoutlib.Revision=2
Pkg.Desc=Android SDK Platform 5.0.1
Pkg.License=(…)
Pkg.LicenseRef=android-sdk-license
Pkg.Revision=2
Pkg.SourceUrl=https\://dl-ssl.google.com/android/repository/repository-10.xml
Platform.MinToolsRev=22
Platform.Version=5.0.1

This allows us to conclude that the Platform.Version value is 5.0.1_r2. This is actually the combination of the properties: Platform.Version and Pkg.Revision. Note this value well as we will need to use it in a few places.

For the following Maven commands, you are assumed to have set the ANDROID_HOME environment variable; otherwise, you will need to suffix all the commands with the property -Dandroid.sdk.path=/path/to/Android/SDK/install. Now, we need to install the android.jar file as any regular Maven artifact in our local repository:

mvn install:install-file  \
-Dfile=%ANDROID_HOME%\platforms\android-21\android.jar \
-DgroupId=com.google.android \
-DartifactId=android \
-Dversion=5.0.1_r2  \
-Dpackaging=jar \
-DgeneratePom=true

Unfortunately, you will have to perform this operation for each Android platform version your application will support. Yet, for Android artifacts prior to 4.1.1.4 (included), the corresponding archives are accessible via Maven Central Repository.

Note

In a later chapter, we will see how to automate the installation of Android artifacts in local repository.

Open a terminal, run the command as follows:

mvn archetype:generate \
  -DarchetypeArtifactId=android-quickstart \
  -DarchetypeGroupId=de.akquinet.android.archetypes \
  -DarchetypeVersion=1.1.0 \
  -DgroupId=com.packt.androidMaven \
  -DartifactId=chapter \
  -Dversion=1.0-SNAPSHOT \
  -Dplatform=21 \
  --batch-mode \
  --quiet

Then, a new folder chapter1 is created. Go to this folder. You should find the tree of a classic Android project:

├───assets
├───res
│   ├───drawable-hdpi
│   ├───drawable-mdpi
│   ├───drawable-xhdpi
│   ├───drawable-xxhdpi
│   ├───layout
│   ├───menu
│   ├───values
│   ├───values-sw600dp
│   ├───values-sw720dp-land
│   ├───values-v11
│   └───values-v14
└───src
    └───main
        └───java
            └───com
                └───packt
                    └───androidMaven

At the root of the project is the Project Object Model (POM), serialized as a pom.xml file. Beware that the pom.xml file is a representation of the actual POM, but discrepancies do exist between the actual POM and the pom.xml file.

Open the POM file in write mode with any regular text editor. Check the <platform.version> tag. This contains the same value as retrieved earlier (in our case: 5.0.1_r2); if it does not, then set it.

You can run a successful mvn setup clean installation. A folder target containing a chapter1.apk archive should be created. Theoretically, this APK file (short for, Android PacKage) can run on a compatible Android device, such as a smart phone, a tablet, or even a smart watch.

Tip

Debug Certificate expired

If you get a build failure with an error similar to the following:

[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.2:apk (default-apk) on project helloWorld: Debug Certificate expired on 02/02/13 00:10 -> [Help 1]

Then, do not worry. Delete the debug.keystore file that is located in ~/.android/or %USERPROFILE%\.android folder. This may fix most of the cases; if it does not, do not panic. Had your Android SDK been installed in parallel with a former version, another .\android\debug.keystore file may remain there. Delete it and relaunch the build.

Integration with IDE

Unless weird exceptions arise, Maven features are fully integrated within the three major IDEs of the market: Eclipse, IntelliJ IDEA, and NetBeans. So, on this side, nothing special needs to be done. However, integrating Android SDK to the IDEs may need some additional operations.

Eclipse

In this section, we will go through the steps you need to follow in order to set up Maven and Android SDK to be used with Eclipse IDE. Some months ago, Eclipse was Google's first choice for creating the Android Studio but recently IntelliJ won the battle. Users that want to use Eclipse Luna for Android development need to follow some steps that we will describe in the following section.

Set up and integration of Maven and Android SDK

First of all, we need to manually install the Google plugin. Go to Help | Install new software. In the dialog that appears, enter the update site URL into the work with text box:

https://dl.google.com/eclipse/plugin/4.4

Add a name to remember the URL subscription and click OK. Then, wait for the list of modules to be retrieved. At the end, you should see something like the following screenshot:

Set up and integration of Maven and Android SDK

Check the boxes for the Developer Tools and the Google Plugin for Eclipse and then click on Next and finally accept the license agreement.

Then, set up the Android SDK: Window | Preferences | Android |. Browse to set the SDK Location field value | OK:

Set up and integration of Maven and Android SDK

Besides, Eclipse embeds a built-in version of Maven (3.2.1 with Eclipse 4.4 Luna). Yet, you can use a specific version of Maven: go to Window | Preferences | Maven | Installations | Add and browse to the right location | OK, as shown in the following screenshot:

Set up and integration of Maven and Android SDK

Creation of a project in Eclipse

Open New (Alt+Shift+N) | Project | Maven |Maven Project. Click Next on the first window that is displayed and you see the following screenshot:

Creation of a project in Eclipse

If you try to filter the catalog with the keyword "android", the list will probably show nothing; so, we need to add the archetype we want to use for the project creation. Click on the Add Archetype button and fill in the archetype details as shown in the next screenshot and click on the OK button:

Creation of a project in Eclipse

Now, the archetype should be available and selected in the dialog box we are looking at. Click again on Next and enter the same data we have specified to maven when we created the project using command line—see the following screenshot. Don't forget to change the platform property value to 21 as this is the SDK version we have installed so far. The default, which is 16, will cause the maven goals to fail because the corresponding SDK is not yet installed in our environment:

Creation of a project in Eclipse

Now, you can open a terminal window and run the following command:

mvn clean install

You can also run the same goal using Eclipse and that's all. We have achieved the same result using our favorite IDE with just a few steps and we are now ready to start developing, testing, and running our first android application with Maven.

IntelliJ IDEA / Android Studio

IntelliJ IDEA is an IDE designed for Java development.

Set up and integration of Maven and Android SDK

Android Studio is promoted by Google as IDE for Android projects. Actually, Android Studio can be seen as a fork of main IntelliJ IDEA tool. Therefore, installation and configuration for both of them looks very similar or identical.

For pure Android projects, IntelliJ IDEA Community is sufficient: it includes core features such as Maven, Git, and Android support. Anyway, if you intend to develop enterprise projects linked with other Java/JEE frameworks and multitier architecture, you should consider installing the Ultimate version. Besides, beware that, at least so far, Android Studio is proposed as the suggested IDE from Google to develop Android applications.

Download IntelliJ IDEA from the page http://www.jetbrains.com/idea/download/ and/or Android Studio from this one: https://developer.android.com/sdk/index.html

On first launch, IntelliJ IDEA and Android Studio will ask you whether you already have an install. If you do, then hint at the location of the settings as shown in the following screenshot:

Set up and integration of Maven and Android SDK

Of course, settings of an IntelliJ IDEA install can be used for Android Studio and vice versa. The next steps of setup differ for IntelliJ IDEA and Android Studio.

Specific to Android Studio

Go to the settings (Ctrl+Alt+S) and then Plugins. Verify that the Maven plugins are installed.

Unlike, do uncheck Gradle plugin as shown in the following screenshot:

Specific to Android Studio

One might wonder why we need to disable Gradle to support Maven for Android development? Actually, by default, Android Studio considers Android/Maven projects as Eclipse-Android projects that are to be imported as regular Eclipse projects and then migrated to Gradle. This is the reason why we need to disable Gradle. Yet, this disables Android support, too. Don't worry, we will restore it later.

Besides, Android Studio should retrieve the Maven install location (based on the environment variable M2_HOME). If it does not, or if you need to use a custom location or version, you can navigate to Maven submenu inside the the settings (Ctrl+Alt+S) and override locations for Maven install, settings, and repository as shown in the following screenshot:

Specific to Android Studio

Specific to IntelliJ IDEA

On installing IntelliJ IDEA with the configuration wizard, take care to add Android and Maven plugins as shown in the following screenshot:

Specific to IntelliJ IDEA

Post this, we also choose which plugins we want to enable or disable, as shown in the following screenshot:

Specific to IntelliJ IDEA

Import of project

Importing the project with Android Studio requires a bit more work than with pure IntelliJ IDEA.

Specific to Android Studio

We will follow the following steps to import an existing Android Maven project to Android Studio and use this as our IDE to further development as follows:

  1. Go to File |Import Project as shown in the following screenshot:
    Specific to Android Studio
  2. Browse to the POM and select it. Click on OK. Accept default options:
    Specific to Android Studio
  3. Confirm default options until Finish button. Android Studio displays the imported project, which is considered for the moment as a mere Java project, without any Android-specifics.
  4. Go to the settings (Ctrl+Alt+S) | Plugins, restore the disabled plugins: Android Designer, Android Support, Google Cloud Tools for Android Studio, and Gradle.
  5. Restart Android Studio. The IDE informs you that the Android framework is detected. Click on Configure as shown in the following screenshot:
    Specific to Android Studio
  6. Check AndroidManifest.xml option and then click on OK:
    Specific to Android Studio
  7. Open the project structure (Ctrl+Alt+Shift+S) | SDKs. Click on the + sign (shortcut: Alt+Insert) | Add a new SDK | Select Android SDK | Browse to ANDROID_HOME variable | OK | Confirm both Java SDK and Build target | OK:
    Specific to Android Studio

You can run Maven to build the project from Android Studio. You are now ready to develop!

Specific to Android Studio

Specific to IntelliJ IDEA

Actually, IntelliJ IDEA is not as strongly linked to Gradle as Android Studio. This is why, for IntelliJ IDEA, the import follows the same template but is faster: simply import the POM and add the Android SDK.

NetBeans

NetBeans is the third commonly used IDE in Java development community. Originally maintained and promoted by Sun, now a division of Oracle, NetBeans still has features that fits the needs of Android development.

Download NetBeans from https://netbeans.org/downloads/. Install it.

Set up and integration of Maven and Android SDK

Let's start the setup by following these steps:

  1. Go to Tools | Plugins. In the fourth tab ,that is, Installed, check whether Maven plugin is installed. If needed, install or update it as shown in the following screenshot:
    Set up and integration of Maven and Android SDK
  2. Like Eclipse, a default version of Maven is embedded; yet, you can override it: Tools | Options | Java | Maven | Executions | Maven Home.

    Android plugin for NetBeans is NBAndroid. It is not available through default update centers. Besides, the features of free version are poor and limited. Anyway, a 1-month evaluation plan is offered.

  3. Go to Settings tab. Add and enter the name and URL, respectively, NBAndroid and http://nbandroid.org/updates/updates.xml, as shown in the following screenshot:
    Set up and integration of Maven and Android SDK
  4. Go to Available Plugins, check Android and NBAndroid Extensions (NBAndroid Gradle Support is not needed, unless you think of using both Maven and Gradle), and then Install. Accept the license, dismiss the warning about nonsigned modules, and restart NetBeans.
  5. Go to Tools | Options | Miscellaneous | Android | set Android SDK location as shown in the following screenshot:
    Set up and integration of Maven and Android SDK

Import a project

Go to File | Open Project (Ctrl+Shift+O), browse until the folder containing the POM. You are ready to develop with Android.

Tip

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Summary

Thus, in this opening chapter, we learned or revised how to install Maven and the Android SDK, and integrate them with an IDE. By now, you should be able to:

  • Set up the JDK
  • Set up Maven
  • Set up Android SDK
  • Set up a development environment
  • Importing any Android project into major IDEs based on Maven

The next chapter will teach you the basic steps to develop a simple Android application using maven and so will use most of the things we discussed. If you don't feel confident in your current knowledge, then feel free to read this chapter again.

Left arrow icon Right arrow icon

Description

Android Application Development with Maven is intended for Android developers or devops engineers who want to use Maven to effectively develop quality Android applications. It would be helpful, but not necessary, if you have some previous experience with Maven.

What you will learn

  • Integrate Maven with your favorite Android IDE
  • Install and configure Maven with your local development environment
  • Create the proper Maven structure for both standalone Android applications or applications that are part of a bigger project
  • Run unit tests using popular frameworks such as Robolectric and collect coverage information using Maven plugins
  • Configure a variety of different tools such as Robotium, Spoon, and Selendroid to run integration tests
  • Handle dependencies and different versions of the same application
  • Manage and automate the release process of your application inside/outside Google Play
  • Discover new tools such as Eclipse, IntelliJ IDEA/Android Studio, and NetBeans, which perfectly integrate with Maven and boost your productivity

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 19, 2015
Length: 192 pages
Edition : 1st
Language : English
ISBN-13 : 9781783986118
Category :
Languages :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 19, 2015
Length: 192 pages
Edition : 1st
Language : English
ISBN-13 : 9781783986118
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 61.98
Mastering Apache Maven 3
€36.99
Android Application Development with Maven
€24.99
Total 61.98 Stars icon
Banner background image

Table of Contents

8 Chapters
1. Beginning with the Basics Chevron down icon Chevron up icon
2. Starting the Development Phase Chevron down icon Chevron up icon
3. Unit Testing Chevron down icon Chevron up icon
4. Integration Testing Chevron down icon Chevron up icon
5. Android Flavors Chevron down icon Chevron up icon
6. Release Life Cycle and Continuous Integration Chevron down icon Chevron up icon
7. Other Tools and Plugins Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
(1 Ratings)
5 star 0%
4 star 100%
3 star 0%
2 star 0%
1 star 0%
Luca Morettoni Jun 26, 2015
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Java and Maven are strongly coupled, if you have worked for medium (or big) Java projects you will have used Maven!Maven has an huge number of plugins that help you on all process of application release, from testing to final packaging, the only price you need to pay is the configuration file that need to be written in XML (yes, I don't like XML).Recently Google moved the Android app building system to Gradle, that is a great tool: it can use the Maven repositories and the migration is not complicated, but the problem is that you need to migrate and learn a new system!This book is a perfect reference if you need to develope an Android application and you want (or you need) use Maven! Is full of real examples, and the authors drives you to create a pom file for a real application, giving you hints about useful plugins and configuration! Personally I didn't like so much the chapter about the IDE integration, looks like it was written much quickly compared to the other sections of the book.If you need to read (or learn) about Maven and Android project this book is for you!
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.