Learning Android Intents


Learning Android Intents
eBook: $26.99
Formats: PDF, PacktLib, ePub and Mobi formats
$22.94
save 15%!
Print + free eBook + free PacktLib access to the book: $71.98    Print cover: $44.99
$44.99
save 37%!
Free Shipping!
UK, US, Europe and selected countries in Asia.
Also available on:
Overview
Table of Contents
Author
Reviews
Support
Sample Chapters
  • Understand Android Intents to make application development quicker and easier
  • Categorize and implement various kinds of Intents in your application
  • Perform data manipulation within Android applications

Book Details

Language : English
Paperback : 318 pages [ 235mm x 191mm ]
Release Date : January 2014
ISBN : 1783289635
ISBN 13 : 9781783289639
Author(s) : Muhammad Usama bin Aftab, Wajahat Karim
Topics and Technologies : All Books, Mobile Application Development, Android, Open Source


Table of Contents

Preface
Chapter 1: Understanding Android
Chapter 2: Introduction to Android Intents
Chapter 3: Intent and Its Categorization
Chapter 4: Intents for Mobile Components
Chapter 5: Data Transfer Using Intents
Chapter 6: Accessing Android Features Using Intents
Chapter 7: Intent Filters
Chapter 8: Broadcasting Intents
Chapter 9: Intent Service and Pending Intents
Index
  • Chapter 1: Understanding Android
    • Introducing Android
      • Exploring the different versions of Android
      • Google Play – the official app store for Android
    • Understanding the whys and whens of Android
      • The evolution of Android OS
    • Official IDE from Google – the Android Studio
      • Features of Android Studio
      • Limitations of Android Studio
    • Building blocks of an Android application
      • Coding components
      • Media components
        • The assets folder
        • The res folder
      • XML components
        • The layout folder
        • The menu folder
        • The values folder
        • AndroidManifest.xml
      • Referencing components
      • Library components
    • Android Activity lifecycle
      • Fundamental states of an activity
      • The callback methods of the Activity lifecycle
      • The activity lifecycle flow
    • Summary
  • Chapter 2: Introduction to Android Intents
    • Role of intents in an Android Application
      • Role of intents in Android Activities
      • Role of intents in data transfer between activities
      • Role of intents in Wi-Fi and Bluetooth transfer
      • Role of intents in Android Camera
      • Role of intents in GPS Sensor
      • Role of intents in sending SMS/MMS
      • Role of intents in Mobile Calls
      • Role of intents in e-mail and social network posts
      • Role of intents in Android Services
      • Role of intent in Broadcast Receiver
      • Role of intent in time zones
      • Role of intent in Status Bar
    • Intent – a technical overview
      • The Coding component
      • The XML component
    • Implementation of Android Intents for Activity Navigation
      • Understanding the flow
        • Part one – MainActivity.java
        • Part two – MySecondActivity.java
        • Part three – activity_main.xml
        • Part four – activity_two_layout.xml
        • Part five – AndroidManifest.xml
      • Other constructors of the android.content.Intent class
        • Intent()
        • Intent(intent o)
        • Intent(Context c, Class<?> cls)
        • Intent(String action)
        • Intent(String action, URI uri)
      • Getting results from Android Intents
        • Understanding with an example
        • Going deep into the example
        • Explaining the code
    • Structure of an intent
      • Component
      • Actions
      • Data
      • Extras
    • Summary
  • Chapter 3: Intent and Its Categorization
    • Explicit intents
      • Using explicit intents in an Android application
        • Starting an activity through an explicit intent
        • Starting a service through an explicit intent
    • Implicit intents
      • Using implicit intents in an Android application
        • Sharing content using implicit intents
        • Selecting an image through an implicit intent
    • Intents and Android late binding
    • Summary
  • Chapter 4: Intents for Mobile Components
    • Common mobile components
      • The Wi-Fi component
      • The Bluetooth component
      • The Cellular component
      • Global Positioning System (GPS) and geo-location
      • The Geomagnetic field component
      • Sensor components
        • Motion sensors
        • Position sensors
        • Environmental sensors
    • Components and intents
      • Communication components
        • Using Bluetooth through intents
        • Using Wi-Fi through intents
      • Media components
        • Using intents to take pictures
        • Using intents to record video
        • Speech recognition using intents
        • Role of intents in text-to-speech conversion
      • Motion components
        • Intents and proximity alerts
        • Role of intents in proximity alerts
    • Summary
  • Chapter 5: Data Transfer Using Intents
    • Finding the need to transfer data
      • Taking a simple example
    • Data transfer between activities – an INTENTed way
    • Data transfer in explicit intents
    • Methods of data transfer between activities
      • Data transfer using putExtras()
        • Implementation of putExtras()
        • Extras supported data types
        • The concept of Android Bundles
      • Data transfer using Parcelable
        • Implementation of Parcelable
      • Data transfer using Serializable
        • What is Serializable?
        • An example of Serializable
        • Implementation of Serializable
    • Data and the implicit intents
      • Viewing a map
      • Opening a webpage
      • Sending an e-mail
      • Making a call
      • Miscellaneous scenarios
    • Summary
  • Chapter 6: Accessing Android Features Using Intents
    • Features of Android OS
    • Android features versus components
    • Common Android features
      • Layouts and display
      • Data storage and retrieval
      • Connectivity and communication
      • Accessibility and multitouch
      • Extensive content and media support
      • Hardware support
      • Background services and multitasking
      • Enhanced home screen
      • Other Android features
    • Android features and intents
    • The <uses-feature> and <uses-permission> tags
      • Hardware features
      • Software features
    • Sharing using the SEND action
    • Telephony and making calls using intents
      • Making phone calls using intents
    • SMS/MMS using intents
      • Sending SMS using intents
      • Sending MMS using intents
      • Confirming message delivery using intents
      • Receiving SMS messages using intents
        • The SmsManager class
        • The SmsMessage object
        • Protocol Data Unit (PDU)
    • Notification using intents
      • Notification forms
      • The NotificationManager class
      • The Notification class
      • The Notification layout
    • Summary
  • Chapter 7: Intent Filters
    • Intent object and its categorization
      • Component name
        • Intent resolution
      • Action
      • Data
        • Use of data in ACTION_EDIT
        • Use of data in ACTION_CALL
        • Use of data in ACTION_VIEW
      • Category
      • Extras
    • Intent filters
    • Handling multiple intent filters
    • Test components of an intent filter
      • Action test
        • Writing conventions for <action>
      • Category test
        • Setting up the launcher activity
      • Data test
        • Typical representation of the <data> tag
    • Summary
  • Chapter 8: Broadcasting Intents
    • Broadcasting in the Android OS
      • The broadcast intents
    • Built-in broadcasts in Android systems
    • Detecting the low-battery state of a device
      • The BatteryLowReceiver.java file
      • The BatteryLowActivity.java class
      • The AndroidManifest.xml file
    • Detecting the screen on/off state of a phone
      • The ScreenOnOffReceiver.java file
      • The AndroidManifest.xml file
    • Detecting the cell phone's reboot-completed state
      • The PhoneRebootCompletedReceiver.java file
      • The TempService.java file
      • The AndroidManifest.xml file
    • Sending and receiving custom broadcasts
      • The activity_main.xml layout file
      • The MainActivity.java file
      • The CustomReceiver.java file
      • The AndroidManifest.xml file
    • Summary
  • Chapter 9: Intent Service and Pending Intents
    • Intent Service
      • Comparison of four fundamentals
        • Best case to use
        • Triggers
    • Usage and implementation of Intent Service
      • Generating a fake notification from Intent Service
      • Taking another example
  • Pending Intents
    • How to make Pending Intents work?
  • Summary

Muhammad Usama bin Aftab

Muhammad Usama bin Aftab is a telecommunications engineer with a flair for programming. He has been working in the IT industry for the last two years, in which he worked on Android Development, AndEngine GLES 1 and 2, Starling, Adobe Air, and Unity 3D. He also has a total of two years of Android experience consisting of professional and freelance work that he has done. In June 2011, he started his career from a silicon-valley-based company named Folio3 Pvt. Ltd. Folio3 guided him a lot. This helped him discover various technologies with highly qualified professionals.


Wajahat Karim

Wajahat Karim is a software engineer and has a high interest in game development for mobile and Facebook platforms. He completed his graduation from NUST School of Electrical Engineering & Computer Sciences (SEECS), Islamabad, Pakistan. He has been working on games since he was in the third year of his graduation. He is skilled in many platforms including Android SDK, AndEngine GLES 1 and 2, Adobe Flash, Adobe Flex, Adobe AIR, Unity3D, and Game Maker. He is also skilled, not only in programming and coding, but also in computer graphics tools, such as Adobe Photoshop CS5, Adobe Illustrator, Adobe Flash, 3D Studio Max, and Autodesk Maya 2012. After working on a Facebook game in WhiteRabbit Studios until September 2012, he joined a silicon valley-based company, Folio3 Pvt.Ltd, where he provides his services in mobile games using Unity3D, Adobe Flash, and AndEngine. He also runs his own mobile app/game startup called AppSoul Studio (Pvt.) Ltd. in his part time

Code Downloads

Download the code and support files for this book.


Submit Errata

Please let us know if you have found any errors not listed on this list by completing our errata submission form. Our editors will check them and add them to this list. Thank you.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Frequently bought together

Learning Android Intents +    OpenLayers 2.10 Beginner's Guide =
50% Off
the second eBook
Price for both: €27.85

Buy both these recommended eBooks together and get 50% off the cheapest eBook.

What you will learn from this book

  • Understand Android Intents and their importance in Android apps
  • Get to grips with the different types of Intents and their implementation
  • Discover data transfer methods in Android Intents along with their optimization and performance comparisons
  • Explore the implementation of Intents while invoking Android Features in an application.
  • Use Intent Filters and their sub-domains in order to perform various actions and sorting categories in Android Intents
  • Catch different events while working with Broadcast Receiver and perform various actions
  • Implement pending Intents and Intent Service, sending text to the Notification Panel, and much more

In Detail

Android is an emerging technology with loads of apps in the Google Play Market. Till date, it is the biggest marvel in Smartphone technology, propelling a larger number of developers into Android application development. Intent is an essential part of any Android Application and no Android application is complete without using them. Features such as listening broadcasts, sending messages, sharing via social networks, notifications, hardware components including camera, sensors, Wi-Fi, and more, can be used in your applications by using Intents.

This practical guide focuses on using intents to make the best use of various features of Android platform. It is ideal for those developers who want to understand the backbone and the domain of Android Intents, its power, and the need for it inside an Android application. Practical, in-depth examples are used throughout the book, to help you understand the key concepts.

The book starts with introducing the very basic concepts of Android, and its various facts and figures such as different Android versions, their release dates, evolution of Android phones and so on. While covering the basic technical concepts, it proceeds from the easiest route of introducing Android Intents towards the more practical view of Android Intents in terms of components and features.

You will learn how to use different components and features such as transfer data between activities, invoke various features and components of Android, execute different in-built and custom-made services, use hardware and software components of Android device, and start Pending Intents & notifications. You will gain better theoretical knowledge of what is running behind the concepts of Android Intents, and practical knowledge of the mobile-efficient ways to perform a certain task using Android Intents.

Towards the end, you will have a clear vision and a practical grip on Android intents and its features. Learning Android Intents is a proper guide to give you the best knowledge of Intents.

Approach

The book will take an easy-to-follow and engaging tutorial approach, providing a practical and comprehensive way to learn Android intents.

Who this book is for

If you are a novice or an intermediate Android Developer who wants to expand their knowledge of Android Intents, this book is ideal for you. Readers are expected to have basic understanding of Android development, how to use different IDEs, and how to develop applications using Android APIs.

Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software