Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Appcelerator Titanium Application Development by Example Beginner's Guide
Appcelerator Titanium Application Development by Example Beginner's Guide

Appcelerator Titanium Application Development by Example Beginner's Guide: Once you've got into Appcelerator Titanium you'll never look back. This book is the perfect introduction to developing native cross-platform apps for iOS, Android, and Windows 8.

eBook
€8.99 €32.99
Paperback
€41.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

Appcelerator Titanium Application Development by Example Beginner's Guide

Chapter 2. How to Make an Interface

We achieved a lot in the last chapter. Not only did we install Titanium and the emulators but we also created an app! Now that everything is set up we can start to explore the tools that are available to make cross-platform apps.

This chapter will explore the tools that are available in Titanium for building great, engaging, native cross-platform apps. By the end of the chapter we will have moved far beyond our first app by coding windows, views, buttons, and table views, and establishing principles that can be applied to the other controls in the toolkit. We will also touch on how to handle events triggered by the user, which will provide an insight into some of the techniques that we will cover in more detail in Chapter 4, Gluing Your App Together with Events, Variables, and Callbacks.

Expect to read about the following:

  • Windows

  • Views

  • Table views

  • Navigation groups and tabs

  • Labels and buttons

  • Debugging

  • Android menus

  • iOS style buttons

Tip

Downloading the example...

What's in the toolkit?


Broadly speaking you can split the tools in the Titanium SDK into three categories; tools for laying out information on the screen, tools for getting user input, and tools for showing information. Some tools cross these boundaries and lie outside them, but the following list shows the core tools that you will use most of the time:

Category

Tool

Creating a layout

Ti.UI.Window

Ti.UI.View

Ti.UI.TableView

Ti.UI.ScrollView

Ti.UI.ScrollableView

Getting input

Ti.UI.Button

Ti.UI.TextField

Ti.UI.TextArea

Ti.UI.Switch

Ti.UI.Slider

Ti.UI.Picker

Showing information

Ti.UI.ProgressBar

Ti.UI.ImageView

Ti.UI.ActivityIndicator

Ti.UI.Label

Ti.UI.TableView

Ti.UI.AlertDialog

Ti.UI.WebView

A recap


Before we move on to other tools in the toolkit let's take a moment to examine and understand the code that was generated for us in the last chapter. Even though the app was small, it included several key elements that will be used by most apps.

We will now cover the core items in the app. First and most importantly, the window.

Window


A window, or as it is named in the code, Titanium.UI.Window, is the canvas on which all other elements are attached. Without a window there can be no sliders, no buttons, nothing. All app elements are attached (or to use the Titanium terminology, added) to a window using the add command. An app requires at least one window to function and that window must be called from within the app.js file. The following code sample shows how a label is created and added to a window.

var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});
var label1 = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 1',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:'auto'
});

win1.add(label1);

Note

A reference to Titanium.UI.createWindow is the same as Ti.UI.createWindow. Ti is a useful shortcut that is built into Titanium that will be used throughout the book.

In the app created in the last chapter there are two windows, one...

Tab group and tabs


A tab group is a container for a group of tabs. It is displayed at the top of the screen on Android and the bottom on iOS, and allows the user to move between different screens on your app.

Tab groups are very well integrated and well suited to iOS apps and in particular iPhone apps, where they are commonly found on lots of apps; but it doesn't always look good on Android. As is shown in the next image, a tab group on a low resolution Android device takes up a lot of valuable screen estate. Think carefully about how your app will look on Android before committing to creating your app with it.

Note

Tab groups may be on the way out in Android. Titanium 3.0 now creates Android action bars instead of tab groups if you set the Android SDK to higher than 11 in tiapp.xml. See http://developer.appcelerator.com/blog/2012/12/breaking-changes-in-titanium-sdk-3-0.html.

Creating a tab group

Tab groups are created by calling Titanium.UI.createTabGroup() . Tabs are added to tab groups. A...

Labels


Labels are used to display text. Here is an example call to create a label.

var label1 = Titanium.UI.createLabel({
    color:'#999',
    text:'I am Window 1',
    font:{fontSize:20,fontFamily:'Helvetica Neue'},
    textAlign:'center',
    width:Ti.UI.FILL,
});

The properties are explained in the following table:

Attribute

Description

color

The color of the label text. This can be specified as a predefined color name ('green') or hex triplet; for example, '#FFF' refers to white and '#999' refers to light gray.

text

The text to display.

font

The font properties. Note that the font properties are specified in JSON format. Even if you are only defining the fontName property, it should still be JSON formatted otherwise it will be ignored. JSON is discussed in Chapter 3, How to Design Titanium Apps.

Properties that can be specified are:

  • fontFamily

  • fontSize

  • fontStyle

  • fontWeight

textAlign

The justification of the text within the defined size of the label.

width...

Views


Views are an empty drawing surface onto which other items are added. They are the building blocks of a layout. Their beauty is that they allow you to format a section of the screen within the view without having to worry about the other parts of the screen.

Note

What's the difference between a view and a table view?

A table view is used to lay out a vertical list of information such as a list of countries. A view is a container of objects. They are used to help lay out other objects. For example, you could use a view to make a horizontal row of buttons. Views are best thought of as a way to lay out an area of the screen.

Before I attempt to explain how views are used we should add one to the app.

Time for action – adding a view to a window


In the app.js file add the following code that will add a view to the second tab:

var view = Ti.UI.createView({
    top:20,
    bottom:'50%',
    left:20,
    right:'50%',
    backgroundColor:'red'
});

win2.add(view);

What just happened?

A red box has been added to the top left of the second tab as shown in the following screenshot:

The beauty of views is that they act as containers for anything you add to them. So, if you add a button to a view and give the button details of where you want it positioned, for example, 10 pixels from the top and 10 pixels from the left, it will be positioned 10 pixels from the top of the view. Thus a view becomes a small drawing area independent of the window. If you add something to a view, its position is not relative to the window, but relative to the view. So if we add a button with a specific position to our view, the button will be positioned within the view not relative to the window, as we shall now see...

Time for action – adding a button to a view


In app.js add the following code to add the button to the view:

var button1 = Titanium.UI.createButton({
    title:'Button in View',
    top:10,
    left:10
});

view.add(button1);

Note

The text on the button is specified by the title argument. Other objects such as a label or textfield use the text argument to specify the displayed content. See the Appcelerator documentation http://docs.appcelerator.com/titanium/3.0/# for the appropriate argument for your object.

What just happened?

A button has been added within the view. Note that the position of the button of 10 pixels from the top and 10 pixels from the left is relative to the view and not the window. This is an important and very useful feature of views. You lay out the view within a window, like drawing a picture in a paint package that occupies only part of your display.

Note

Notice how the button butts up against the top-right edge of the view. We didn't specify a size for the button via the...

Time for action – making something happen when the button is pressed


Perform the following steps to make something happen when the button is pressed:

  1. Add an event listener to the button. This event listener will respond when the user clicks on the button.

    button1.addEventListener('click', function(e) {alert('You clicked me!')})
  2. Run the app and click on the button!

What just happened?

You added an event listener to the button so that when the button is clicked, an alert box is displayed. The Appcelerator documentation lists the events that are applicable for an object. You will use event listeners frequently in Titanium. They are explained in more detail in Chapter 4, Gluing Your App Together with Events, Variables, and Callbacks.

Adding a settings screen – a TableView masterclass


Views really come into their own when they are added to other controls, which we will see later in this chapter. We will also see them being used to control the layout of other elements. However, first of all, it's time to make something simple but useful with our app.

In this example we are going to use a table view to create a setting screen for the app. It's just one of the many uses there are for a table view. It's a versatile item that crops up in many places such as your contact list and your e-mail inbox. It is a very useful tool. We will now create a settings screen similar to that shown in the previous example.

Time for action – adding a new window


Perform the following steps to add a new window:

  1. Add a new window and create a tab for it in the same way as in the earlier example from this chapter:

    var winSettings = Ti.UI.createWindow({
    });
    
    var tabSettings = Titanium.UI.createTab({  
        icon:'KS_nav_views.png',
        title:'Settings',
        window:winSettings
    });
  2. Add the new tab to the tab group:

    tabGroup.addTab(tabSettings);
  3. In an attempt to keep the app.js file tidy we will place the code to create the settings layout in a function at the top of the file:

    function setupSettings() {
        
    }
  4. The setupSettings function will create a settings layout that will be built on a view. The view will be returned from the function. Make changes to the function code by adding the following code:

    function setupSettings() {
        
        var view = Ti.UI.createView({});
        return view;
    }
  5. This view can be added to the winSettings window by adding the code highlighted in the folowing code. The code adds the return value, which...

Time for action – adding a styled TableViewRow object


With a few simple additions and some changes to fonts we can make a more complex table view layout. This example will add a TableViewRow object that is similar in appearance to the mailbox e-mail listing. Perform the following steps to add a styled TableViewRow object:

  1. Add an empty TableViewRow object:

    var secondRow = Ti.UI.createTableViewRow({});
  2. Add a title to the new row:

    var theTitle = Ti.UI.createLabel({
            text: 'The title',
            font:{fontSize:'16',fontWeight:'bold'},
            minimumFontSize:'12',
            textAlign:'left',
            top:'2',
            left:'10',
            height:'20'
         });
  3. Add another label with context information:

    var theSnippet =  Titanium.UI.createLabel({
            text:'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor',
            font:{fontSize:'11',fontWeight:'normal'},
                textAlign:'left',
            color:'#666',
            bottom:'0',
            left:'10',
            height...

Platform-specific tools


There are many fundamental differences between Android and iOS. Android has the menu, iOS has a back button. Titanium respects this and has elements for individual operating systems.

For the final set of examples in this chapter, we will look at some of the platform-specific tools available in Titanium. It may seem incongruous to have platform-specific controls but it is an absolutely necessary part of the toolkit for creating native applications that embrace the identifying features of the platform. If it is a significant feature of an operating system that is not cross-platform it will be included in Titanium. A great example of this is the menu button on Android. It's a fundamental part of the Android design and something that the user will expect to be available yet there is no equivalent in iOS. Your Android app should make use of it.

Adding an Android menu

In the next example we will add an Android menu to our app.

Time for action – adding an Android menu


Perform the following steps for adding an Android menu:

  1. Add a function that will define the pop-up menu:

    function addMenu(win) {
        var activity = win.activity;
    
        activity.onCreateOptionsMenu = function(e){
    
        var firstItem = e.menu.add({ title: 'First Item' });
        firstItem.addEventListener("click", function(e) {Ti.API.debug('First Item'); });
        
        var secondItem = e.menu.add({ title: 'Second Item'});
        secondItem.addEventListener("click", function(e) {Ti.API.warn('Second Item'); });
        
        var thirdItem = e.menu.add({ title: 'Third Item'});
        thirdItem.addEventListener("click", function(e) {alert('Third Item'); });
    };
    }
  2. Further down app.js where the windows are defined, add the highlighted code to call the function:

    win1.add(label1);
    addMenu(win1);
    
  3. Run the app using the Android emulator.

What just happened?

A pop-up menu was created that is activated by pressing the menu key when Tab 1 is selected. The pop-up menu has three items and...

Time for action – running the Android menu changes on iOS


If you are running on a Mac and have the iOS SDK installed, try running the app on the iOS emulator.

What just happened?

The app will fail to run. The red screen of death that will become familiar as you code your apps will be displayed.

Why did this fail?

The line that caused the error is as follows:

var activity = win.activity;

An iOS window has no concept of an activity. The activity property will not be available on iOS. The Appcelerator documentation is clear in this respect; the documentation shows that the activity property only exists on Android as shown in the following image:

You have to handle this platform-specific code yourself. Fortunately, it's not hard to do and if you are developing a cross-platform app it is a concept you will use often.

Isolating platform-specific code

When you have platform-specific code you have to have some way of avoiding executing it on the wrong platform. This usually means wrapping the code in an...

Time for action – add an iOS fix for the Android menu


Here is how to fix the Android menu problem on iOS:

  1. Add the following function to app.js:

    function isAndroid() {
        return (Ti.Platform.name == 'android');
    }
  2. Wrap the addMenu function where our platform-specific code lies with this code:

    function addMenu(win) {
        
        if (isAndroid()) {
        var activity = win.activity;
    
        activity.onCreateOptionsMenu = function(e){
    
        var firstItem = e.menu.add({ title: 'First Item' });
        firstItem.addEventListener("click", function(e) {Ti.API.debug('First Item'); });
        
        var secondItem = e.menu.add({ title: 'Second Item'});
    	secondItem.addEventListener("click", function(e) {Ti.API.warn('Second Item'); });
        
        var thirdItem = e.menu.add({ title: 'Third Item'});
        thirdItem.addEventListener("click", function(e) {alert('Third Item'); });
        }
    };
    }
  3. Run the app on the iOS emulator.

What just happened?

An if statement was added that ensured that if the app was run on iOS, a menu would not...

Capturing debug messages


There are a few helper functions that are available to enable you to send out debug messages from the app.

Function

Description

Ti.API.debug('text')

Or

console.debug('text')

Write a message to the console at the debug level.

Ti.API.warn('text')

Or

console.warn('text')

Write a message to the console at the warn level. These messages are colored yellow.

alert('text')

Displays an alert box with the text and a single OK button.

Tip

Debugging code should be removed from your code or disabled before you go live. They are unlikely to result in your app submission being rejected, but the same messages that appear on the console in Titanium will be logged to the log files on your device. You don't want a clever developer snooping on your debug messages when the app is live.

Note

Note that by default debug messages will not appear on the console. The default log level is to record errors and warnings. This can be altered by navigating to the Run | Run Configurations...

Time for action – adding an info button to the navigation bar


Perform the following steps to add an info button to the navigation bar:

  1. Add a new function to the top of app.js:

    function rightButton(win) {
        if (!isAndroid()) {
    
          var right = Ti.UI.createButton({
             systemButton:Ti.UI.iPhone.SystemButton.INFO_LIGHT
          });
          right.addEventListener('click',function()
          {
             alert('button clicked!');
          });
          win.setRightNavButton(right); 
       }
    }
  2. Add a call to the function from the main body of app.js:

    rightButton(win1);
  3. Run the App in the iOS emulator.

What just happened?

A couple of iOS-specific properties were used in the rightButton function. The systemButton property allows a predefined iOS icon to be applied to your button. There are several styles available (see documentation for Titanium.UI.iPhone.SystemButton). Then an iOS specific window method setRightNavButton was used to place this button on the right-hand side of the navigation bar.

Summary


That's enough for this chapter. Yes, there are plenty of other elements in the toolkit that we have not covered. I could show you how to add a slider, or a switch, but I see little value in adding several examples when the principle is very similar to adding a button. Don't take my word for it; have a look at the examples from the code snippets. The main difference is the name of the control.

This chapter has taught you the principles you need to employ for adding any of the items in the toolkit. I urge you to go away and play with the app.js code and add sliders, switches, text areas, or any other control. Go ahead and enjoy yourself, it doesn't matter if you break the code, we will be throwing it away after this chapter anyway. It's a good time to move on from this app; it's served us well but it's getting a bit messy and disorganized.

If playing and editing with the code is not your thing, have a look around the Kitchensink app (which can be installed from the Titanium dashboard...

Left arrow icon Right arrow icon

Key benefits

  • Covers iOS, Android, and Windows8
  • Includes Alloy, the latest in Titanium design
  • Includes examples of Cloud Services, augmented reality, and tablet design

Description

Appcelerator Titanium is the leading method for creating native cross-platform apps. This book guides you from the initial stages with the language right through to the submission of your app to the marketplace/app store. Specially crafted examples cover the most common requirements of an app programmer. This book will be your companion as you progress with the language."Appcelerator Titanium Application Development by Example Beginner's Guide" will guide you through the process of designing cross-platform apps using Titanium. It covers all areas of the language from installation through development to submission to the store. This book will take a hands-on approach in teaching you how to write cross-platform apps using Titanium, as well as exploring the new features of Titanium 3. Each chapter will show you how to overcome specific challenges using Titanium. You will learn how to design your apps using MVC principles and Alloy, use the cloud to your advantage, develop apps that work on tablets and phones, use the phone gadgets like the accelerometer, integrate social media, record usage using analytics, and monetise your app. All tasks from installation to deployment to the store are covered and backed by examples. The book will be your companion from your first steps with Titanium to successful live deployment.

Who is this book for?

If you are new to this technology or curious about the possibilities of Appcelerator Titanium then this book is for you. If you are a web developer who is looking for a way to craft cross-platform apps, then this book and the Titanium language is the choice for you.

What you will learn

  • How to design applications that work on all supported platforms
  • How to create layouts that work on all platforms and on both handheld and tablet devices
  • How to design applications using Alloy
  • The integration of social media
  • Use the phone gadgets such as the accelerometer, compass, and camera
  • How to integrate cloud services such as ACS, Parse, and Stackmob
  • How to test your code and deploy to the app store/marketplace
Estimated delivery fee Deliver to Finland

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 25, 2013
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781849695008
Vendor :
Apache
Category :
Languages :

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 Finland

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Apr 25, 2013
Length: 334 pages
Edition : 1st
Language : English
ISBN-13 : 9781849695008
Vendor :
Apache
Category :
Languages :

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 78.98
Appcelerator Titanium Application Development by Example Beginner's Guide
€41.99
Creating Mobile Apps with Appcelerator Titanium
€36.99
Total 78.98 Stars icon
Banner background image

Table of Contents

13 Chapters
How to Get Up and Running with Titanium Chevron down icon Chevron up icon
How to Make an Interface Chevron down icon Chevron up icon
How to Design Titanium Apps Chevron down icon Chevron up icon
Gluing Your App Together with Events, Variables, and Callbacks Chevron down icon Chevron up icon
It's All About Data Chevron down icon Chevron up icon
Cloud-enabling Your Apps Chevron down icon Chevron up icon
Putting the Phone Gadgets to Good Use Chevron down icon Chevron up icon
Creating Beautiful Interfaces Chevron down icon Chevron up icon
Spread the Word with Social Media Chevron down icon Chevron up icon
Sending Notifications Chevron down icon Chevron up icon
Testing and Deploying Chevron down icon Chevron up icon
Analytics Chevron down icon Chevron up icon
Making Money from Your App Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(6 Ratings)
5 star 33.3%
4 star 33.3%
3 star 16.7%
2 star 16.7%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Scott A Schlangen Jun 30, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great starting book, helped me out. Good working examples, and an amazing price this book was great thank you very much
Amazon Verified review Amazon
F.Brefere Oct 28, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Very helpful
Amazon Verified review Amazon
Christopher M Golding May 27, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Used this book to get started with the concepts of building apps using Titanium. I found it to be a good resource, with the exception of a few chapters where the author skips a few steps or does not explain how something is done.
Amazon Verified review Amazon
Vince A Bullinger Nov 29, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Seems like the best Titanium book out there so far. Which is a bit sad. It's a good book, taking you from beginner through to most of the advanced concepts and examples. It's definitely a great reference book for how to tackle a problem. A "Hello, world!" for every problem, which is definitely how it's advertised. I don't like how they say that the Alloy framework is in this book because... it's discussed for six pages. You easily need at least a chapter on Alloy. Not a brief touching and then never mention it again. I understand this is what, the third edition, and it was probably started before Alloy existed, but it's too important. The next edition should have updates to some examples with the inclusion of Alloy and Alloy should have its own chapter.I'd prefer a true best practices book replete with Alloy examples. This does not exist. The Titanium book that you will find that has "best practices" in the title is awful and not recommended. Considering writing my own, but... I don't know the best practices yet.
Amazon Verified review Amazon
Daniel E. Hannon Oct 01, 2014
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
It's a good book but at the time of this review I wouldn't recommend it until the MVC Alloy examples have been updated. Currently it is using some deprecated UI elements which renders the example obsolete. Alloy is the new recommended way of developing Titanium Apps and this book has some catching up to do.
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