Advanced Android Tutorial - RxJS, Ggplot2, Python Data .

Transcription

Advanced Android Tutorial

ADVANCED ANDROID TUTORIALSimply Easy Learning by tutorialspoint.comtutorialspoint.comi

ABOUT THE TUTORIALAdvanced Android TutorialAndroid is an open source and Linux-based operating system for mobile devices such as smartphonesand tablet computers. Android was developed by the Open Handset Alliance, led by Google, and othercompanies.This tutorial will teach you basic Android programming and will also take you through some advanceconcepts related to Android application development.AudienceThis 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 Androidprogramming from where you can take yourself to next levels.PrerequisitesAndroid programming is based on Java programming language so if you have basic understanding onJava programming then it will be a fun to learn Android application development.Copyright & Disclaimer Notice Allthe content and graphics on this tutorial are the property of tutorialspoint.com. Any content fromtutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or formwithout the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws.This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding theaccuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com siteor this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.comTUTORIALS POINTSimply Easy Learning

Table of ContentAdvanced Android Tutorial . 2Audience . 2Prerequisites . 2Copyright & Disclaimer Notice. 2Drag and Drop . 12The Drag/Drop Process. 12The DragEvent Class . 13CONSTANTS . 13METHODS . 13Listening for Drag Event . 14Starting a Drag Event . 14Example . 14Notifications . 19Create and Send Notifications. 20STEP 1 - CREATE NOTIFICATION BUILDER . 20STEP 2 - SETTING NOTIFICATION PROPERTIES . 20STEP 3 - ATTACH ACTIONS . 20STEP 4 - ISSUE THE NOTIFICATION. 21The NotificationCompat.Builder Class . 21Example . 22Big View Notification . 28Location Based Services . 31The Location Object . 31Get the Current Location . 32Get the Updated Location . 33Location Quality of Service . 33Displaying a Location Address . 33Example . 34INSTALL THE GOOGLE PLAY SERVICES SDK . 34CREATE ANDROID APPLICATION . 34Sending Email . 43Intent Object - Action to send Email . 43Intent Object - Data/Type to send Email. 43Intent Object - Extra to send Email . 43Example . 44Sending SMS . 49Using SmsManager to send SMS . 49TUTORIALS POINTSimply Easy Learning

Example . 50Using Built-in Intent to send SMS . 54Intent Object - Action to send SMS . 54Intent Object - Data/Type to send SMS . 54Intent Object - Extra to send SMS . 54Example . 54Phone Calls . 59Intent Object - Action to make Phone Call. 59Intent Object - Data/Type to make Phone Call . 59Example . 59Publishing Android Application . 64Export Android Application . 65Google Play Registration. 68Android Alert Dialoges . 70Example . 71Android Animations . 81Tween Animation . 81Zoom in animation . 82Example . 82Android Audio Capture . 93Example . 94Android AudioManager . 103Example . 104Android Auto Complete . 113Example . 114Android Best Practices . 121Best Practices - User input . 121Best Practices - Background jobs . 121ASYNCTASK VS SERVICES. . 121Best Practices - Performance . 122Best Practices - Security and privacy . 122Example . 122Android Bluetooth . 131Example . 132Android Camera . 143Using existing android camera application in our application . 143Example . 144Directly using Camera API provided by android in our application . 150Example . 152TUTORIALS POINTSimply Easy Learning

Android Clipboard . 158Copying data . 158Pasting data . 159Example . 159Android Custom Fonts . 166Example . 167Android Data Backup . 170Example . 171Test your BackupAgent . 173INSTALL YOUR APPLICATION ON A SUITABLE ANDROID SYSTEM IMAGE.ENSURE DATA BACKUP IS ENABLED . 173PERFORMING BACKUP . 173UNINSTALL AND REINSTALL YOUR APPLICATION . 173Android Developer Tools. 174SDK tools . 174Android . 175DDMS. 175RUNNING DDMS . 175HOW IT WORKS . 175USING DDMS . 175MAKING SMS . 175MAKING CALL . 176CAPTURING SCREENSHOT . 178Sqlite3 . 179USE SQLITE3 FROM A REMOTE SHELL. 179USING SQLITE3 DIRECTLY . 179Platform tools . 180Android Emulator . 181Creating AVD . 181Creating Snapshots . 181Changing Orientation . 182Emulator Commands. 183Emulator - Sending SMS . 184SENDING SMS THROUGH TELNET. . 184Emulator - Making Call . 185Emulator - Transferring files . 186Android Facebook Integration . 187Integrating Facebook SDK . 187GENERATING APPLICATION SIGNATURE . 187TUTORIALS POINTSimply Easy Learning173

REGISTERING YOUR APPLICATION. 188DOWNLOADING SDK AND INTEGRATING IT . 188CREATING FACEBOOK LOGIN APPLICATION . 188Intent share . 189Example . 190Android Gestures . 197Handling Pinch Gesture . 197Example . 198Android Google Maps . 205Adding Google Map . 205GOOGLE MAP - ACTIVITY FILE . 205GOOGLE MAP - LAYOUT FILE . 205GOOGLE MAP - ANDROIDMANIFEST FILE.

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 .