Advanced Android Tutorial

Advanced Android Tutorial

ADVANCED ANDROID TUTORIAL

Simply Easy Learning by



i

ABOUT THE TUTORIAL

Advanced Android Tutorial

Android is an open source and Linux-based operating system for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies. This tutorial will teach you basic Android programming and will also take you through some advance concepts related to Android application development.

Audience

This tutorial has been prepared for the beginners to help them understand basic Android programming. After completing this tutorial you will find yourself at a moderate level of expertise in Android programming from where you can take yourself to next levels.

Prerequisites

Android programming is based on Java programming language so if you have basic understanding on Java programming then it will be a fun to learn Android application development.

Copyright & Disclaimer Notice

All the content and graphics on this tutorial are the property of . Any content from

or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of . Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the site or this tutorial content contains some errors, please contact us at webmaster@

TUTORIALS POINT Simply Easy Learning

Table of Content

Advanced Android Tutorial ....................................................... 2 Audience.................................................................................. 2 Prerequisites ............................................................................ 2 Copyright & Disclaimer Notice.................................................. 2 Drag and Drop ....................................................................... 12

The Drag/Drop Process............................................................................12 The DragEvent Class ...............................................................................13 CONSTANTS ...........................................................................................13 METHODS ...............................................................................................13 Listening for Drag Event...........................................................................14 Starting a Drag Event ...............................................................................14 Example ...................................................................................................14

Notifications ........................................................................... 19

Create and Send Notifications..................................................................20 STEP 1 - CREATE NOTIFICATION BUILDER ........................................20 STEP 2 - SETTING NOTIFICATION PROPERTIES ................................20 STEP 3 - ATTACH ACTIONS ..................................................................20 STEP 4 - ISSUE THE NOTIFICATION.....................................................21 The NotificationCompat.Builder Class......................................................21 Example ...................................................................................................22 Big View Notification ................................................................................28

Location Based Services........................................................ 31

The Location Object .................................................................................31 Get the Current Location ..........................................................................32 Get the Updated Location ........................................................................33 Location Quality of Service.......................................................................33 Displaying a Location Address .................................................................33 Example ...................................................................................................34 INSTALL THE GOOGLE PLAY SERVICES SDK ....................................34 CREATE ANDROID APPLICATION ........................................................34

Sending Email........................................................................ 43

Intent Object - Action to send Email .........................................................43 Intent Object - Data/Type to send Email...................................................43 Intent Object - Extra to send Email...........................................................43 Example ...................................................................................................44

Sending SMS ......................................................................... 49

Using SmsManager to send SMS ............................................................49

TUTORIALS POINT Simply Easy Learning

Example ...................................................................................................50 Using Built-in Intent to send SMS.............................................................54 Intent Object - Action to send SMS ..........................................................54 Intent Object - Data/Type to send SMS....................................................54 Intent Object - Extra to send SMS............................................................54 Example ...................................................................................................54

Phone Calls ........................................................................... 59

Intent Object - Action to make Phone Call................................................59 Intent Object - Data/Type to make Phone Call .........................................59 Example ...................................................................................................59

Publishing Android Application ............................................. 64

Export Android Application .......................................................................65 Google Play Registration..........................................................................68

Android Alert Dialoges ........................................................... 70

Example ...................................................................................................71

Android Animations ................................................................ 81

Tween Animation .....................................................................................81 Zoom in animation....................................................................................82 Example ...................................................................................................82

Android Audio Capture........................................................... 93

Example ...................................................................................................94

Android AudioManager ........................................................ 103

Example .................................................................................................104

Android Auto Complete ........................................................ 113

Example .................................................................................................114

Android Best Practices......................................................... 121

Best Practices - User input.....................................................................121 Best Practices - Background jobs ..........................................................121 ASYNCTASK VS SERVICES.................................................................121 Best Practices - Performance.................................................................122 Best Practices - Security and privacy .....................................................122 Example .................................................................................................122

Android Bluetooth ................................................................ 131

Example .................................................................................................132

Android Camera................................................................... 143

Using existing android camera application in our application .................143 Example .................................................................................................144 Directly using Camera API provided by android in our application.........150 Example .................................................................................................152

TUTORIALS POINT Simply Easy Learning

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download