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 Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
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
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

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 : 9781783986101
Category :
Languages :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
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

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Malta

Premium delivery 7 - 10 business days

€32.95
(Includes tracking information)

Product Details

Publication date : Mar 19, 2015
Length: 192 pages
Edition : 1st
Language : English
ISBN-13 : 9781783986101
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

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela