Advanced Android Tutorial - Tutorialspoint

3y ago
325 Views
45 Downloads
6.96 MB
532 Pages
Last View : 13d ago
Last Download : 3m ago
Upload by : Kaleb Stephen
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. 205Customizing Google Map . 206ADDING MARKER . 206CHANING MAP TYPE. 206ENABLE/DISABLE ZOOM . 206Example . 207Integrating Google Maps . 207Download and configure. Google Play Services SDK . 208INSTALL GOOGLE SERVICES SDK . 208IMPORT SDK TO ECLIPSE . 208CONFIGURE YOUR PROJECT WITH SDK . 208Obtaining the API key. 209GETTING CERTIFICATE FROM KEYTOOL . 209GETTING KEY FROM GOOGLE CONSOLE . 210Specify Android Manifest settings . 210Adding Google Maps to your application. . 211Android Image Effects . 215Example . 216Android Image Switcher . 224Example . 225Android Internal Storage . 231Writing file . 231Reading file . 231Example . 232Android JetPlayer. 239Example . 240Using JetCreator . 240TUTORIALS POINTSimply Easy Learning

INSTALLING PYTHON . 240INSTALLING WXPYTHON . 241RUUNING JETCREATOR . 241CREATING JETCONTENT . 242Verifying Results . 243Android JSON Parser. 244JSON - Elements . 244JSON - Parsing . 245Example . 246Android Linkedin Integration . 254Integrating Linkedin SDK. 254REGISTERING YOUR APPLICATION . 254DOWNLOADING SDK AND INTEGRATING IT . 255POSTING UPDATES ON LINKEDIN APPLICATION . 255Intent share . 255Example . 256Android Loading Spinner. 263Example . 264Android Localization . 268LOCALIZING STRINGS . 268ITALY, RES/VALUES-IT/STRINGS.XML . 268SPANISH, RES/VALUES-IT/STRINGS.XML . 269FRENCH, RES/VALUES-IT/STRINGS.XML . 269Example . 269Android Login Screen. 274Example . 275Android MediaPlayer . 283Example . 284Android Multitouch . 295Example . 296Android Navigation . 305Providing Up Navigation . 305Handling device back button . 305Example . 306Android Network Connection. 314Checking Network Connection . 314Performing Network Operations .

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

Related Documents:

Android Studio IDE Android SDK tool Latest Android API Platform - Android 6.0 (Marshmallow) Latest Android API emulator system image - Android 6.0 Android Studio is multi-platform Windows, MAC, Linux Advanced GUI preview panel See what your app looks like in different devices Development environment Android Studio 9

An Android Studio SQLite Database Tutorial Previous Table of Contents Next An Android Studio TableLayout and TableRow Tutorial Understanding Android Content Providers in Android Studio eBookFrenzy.com Purchase the fully updated Android 6 Edition of this Android Studio Development Essentials publication in eBook ( 9.99) or Print ( 38.99) format

ADT (Android Development Tool) bundle or ! Eclipse ADT plug-in Android SDK or ! Android studio ! Download earlier SDK versions using SDK manager if needed . Android Virtual Device (AVD) ! Android emulator allows . Android App Essentials ! Layout ! View objects: UI widgets such as buttons, text box etc. .

tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without 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 the

tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without 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 the

tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without 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 the

tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without 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 the

tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without 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 the