Muutke küpsiste eelistusi

E-raamat: Android Recipes: A Problem-Solution Approach

  • Formaat: PDF+DRM
  • Ilmumisaeg: 07-Dec-2016
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484222591
  • Formaat - PDF+DRM
  • Hind: 55,56 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Lisa ostukorvi
  • Lisa soovinimekirja
  • See e-raamat on mõeldud ainult isiklikuks kasutamiseks. E-raamatuid ei saa tagastada.
  • Formaat: PDF+DRM
  • Ilmumisaeg: 07-Dec-2016
  • Kirjastus: APress
  • Keel: eng
  • ISBN-13: 9781484222591

DRM piirangud

  • Kopeerimine (copy/paste):

    ei ole lubatud

  • Printimine:

    ei ole lubatud

  • Kasutamine:

    Digitaalõiguste kaitse (DRM)
    Kirjastus on väljastanud selle e-raamatu krüpteeritud kujul, mis tähendab, et selle lugemiseks peate installeerima spetsiaalse tarkvara. Samuti peate looma endale  Adobe ID Rohkem infot siin. E-raamatut saab lugeda 1 kasutaja ning alla laadida kuni 6'de seadmesse (kõik autoriseeritud sama Adobe ID-ga).

    Vajalik tarkvara
    Mobiilsetes seadmetes (telefon või tahvelarvuti) lugemiseks peate installeerima selle tasuta rakenduse: PocketBook Reader (iOS / Android)

    PC või Mac seadmes lugemiseks peate installima Adobe Digital Editionsi (Seeon tasuta rakendus spetsiaalselt e-raamatute lugemiseks. Seda ei tohi segamini ajada Adober Reader'iga, mis tõenäoliselt on juba teie arvutisse installeeritud )

    Seda e-raamatut ei saa lugeda Amazon Kindle's. 

This book offers more than 100 down-to-earth code recipes, and guides you step-by-step through a wide range of useful topics using complete and real-world working code examples. It is updated to include the Android N SDK (7.0) , as well as earlier releases.

Instead of abstract descriptions of complex concepts, in Android Recipes, you'll find live code examples. When you start a new project you can consider copying and pasting the code and configuration files from this book and then modifying them for your own customization needs.

Crammed with insightful instruction and helpful examples, this fourth edition of Android Recipes is your guide to writing apps for one of today’s hottest mobile platforms. It offers pragmatic advice that will help you get the job done quickly and well. This can save you a great deal of work over creating a project from scratch!

Android continues to be one of the leading mobile OS and development platforms driving today's mobile innovations and the apps ecosystem. Android appears complex, but offers a variety of organized development kits to those coming into Android with differing programming language skill sets.

What you'll learn

  • Code for Android smartphones and tablets
  • Use external libraries to save time and effort
  • Boost app performance by using the Android NDK and RenderScript
  • Design apps for performance, responsiveness, and seamlessness
  • Send data between devices and other external hardware
  • Persist application data and share it between applications
  • Capture and play back various device media items
  • Communicate with web services
  • Get the most out of your user interface
Who is this book for

This book is a handy reference for all Android app developers.
About the Authors xxiii
About the Technical Reviewer xxv
Acknowledgments xxvii
Introduction xxix
Chapter 1 Layouts and Views 1(84)
1-1 Styling Common Components
1(9)
Problem
1(1)
Solution
1(1)
How it Works
1(9)
1-2 Toggling System UI Elements
10(4)
Problem
10(1)
Solution
11(1)
How It Works
11(3)
1-3 Creating and Displaying Views
14(6)
Problem
14(1)
Solution
14(1)
How It Works
14(6)
1-4 Animating a View
20(6)
Problem
20(1)
Solution
20(1)
How ft Works
21(5)
1-5 Animating Layout Changes
26(3)
Problem
26(1)
Solution
26(1)
How It Works
26(3)
1-6 Implementing Situation-Specific Layouts
29(9)
Problem
29(1)
Solution
30(1)
How It Works
30(8)
1-7 Placing Text over Images
38(1)
Problem
38(1)
Solution
38(1)
1-8 Making Extensible Collection Views
39(12)
Problem
39(1)
Solution
39(1)
How It Works
40(11)
1-9 Customizing Empty Lists
51(2)
Problem
51(1)
Solution
51(1)
How It Works
51(2)
1-10 Using CardView in RecyclerView
53(4)
Problem
53(1)
Solution
53(1)
How It Works
54(3)
1-11 Making RecyclerView Section Headers
57(3)
Problem
57(1)
Solution
58(1)
How It Works
58(2)
1-12 Creating Compound Controls
60(4)
Problem
60(1)
Solution
61(1)
How It Works
61(3)
1-13 Customizing Transition Animations
64(10)
Problem
64(1)
Solution
64(1)
How It Works
64(10)
1-14 Creating View Transformations
74(6)
Problem
74(1)
Solution
74(1)
How it Works
74(6)
1-15 Using Android Data Bindings
80(4)
Problem
80(1)
Solution
80(1)
How It Works
80(4)
Summary
84(1)
Chapter 2 User Interaction Recipes 85(104)
2-1 Leveraging the Action Bar
85(8)
Problem
85(1)
Solution
85(1)
How It Works
86(7)
2-2 Locking Activity Orientation
93(1)
Problem
93(1)
Solution
93(1)
How It Works
93(1)
2-3 Performing Dynamic Orientation Locking
94(2)
Problem
94(1)
Solution
94(1)
How It Works
94(2)
2-4 Manually Handling Rotation
96(3)
Problem
96(1)
Solution
96(1)
How It Works
97(2)
2-5 Creating Contextual Actions
99(6)
Problem
99(1)
Solution
100(1)
How It Works
100(5)
2-6 Displaying a User Dialog Box
105(6)
Problem
105(1)
Solution
105(1)
How It Works
105(6)
2-7 Customizing Menus and Actions
111(5)
Problem
111(1)
Solution
111(1)
How It Works
111(5)
2-8 Customizing BACK Behavior
116(4)
Problem
116(1)
Solution
116(1)
How It Works
117(3)
2-9 Emulating the HOME Button
120(1)
Problem
120(1)
Solution
120(1)
How It Works
120(1)
2-10 Monitoring TextView Changes
120(3)
Problem
120(1)
Solution
121(1)
How It Works
121(2)
2-11 Customizing Keyboard Actions
123(3)
Problem
123(1)
Solution
124(1)
How It Works
124(2)
2-12 Dismissing the Soft Keyboard
126(1)
Problem
126(1)
Solution
127(1)
How It Works
127(1)
2-13 Handling Complex Touch Events
127(17)
Problem
127(1)
Solution
127(1)
How It Works
128(16)
2-14 Forwarding Touch Events
144(5)
Problem
144(1)
Solution
144(1)
How It Works
145(4)
2-15 Blocking Touch Thieves
149(4)
Problem
149(1)
Solution
150(1)
How It Works
150(3)
2-16 Making Drag-and-Drop Views
153(8)
Problem
153(1)
Solution
153(1)
How It Works
154(7)
2-17 Using the Material Design Navigation Drawer
161(8)
Problem
161(1)
Solution
161(1)
How It Works
161(8)
2-18 Swiping Between Views
169(11)
Problem
169(1)
Solution
169(1)
How It Works
170(10)
2-19 Navigating with Tabs
180(3)
Problem
180(1)
Solution
180(1)
How It Works
180(3)
2-20 Actionable User Feedback Using Snackbar
183(5)
Problem
183(1)
Solution
183(1)
How It Works
184(4)
Summary
188(1)
Chapter 3 Communications and Networking 189(70)
3-1 Displaying Web Information
189(5)
Problem
189(1)
Solution
189(1)
How It Works
189(5)
3-2 Intercepting WebView Events
194(2)
Problem
194(1)
Solution
194(1)
How It Works
195(1)
3-3 Accessing WebView with JavaScript
196(3)
Problem
196(1)
Solution
196(1)
How It Works
196(3)
3-4 Displaying Online Images
199(2)
Problem
199(1)
Solution
199(1)
How It Works
199(2)
3-5 Downloading Completely in the Background
201(4)
Problem
201(1)
Solution
201(1)
How It Works
201(4)
3-6 Accessing a REST API
205(7)
Problem
205(1)
Solution
205(1)
How It Works
205(7)
3-7 Parsing JSON
212(4)
Problem
212(1)
Solution
212(1)
How It Works
212(4)
3-8 Parsing XML
216(4)
Problem
216(1)
Solution
216(1)
How It Works
216(4)
3-9 Receiving SMS
220(3)
Problem
220(1)
Solution
220(1)
How It Works
220(3)
3-10 Sending an SMS Message
223(3)
Problem
223(1)
Solution
223(1)
How It Works
224(2)
3-11 Communicating over Bluetooth
226(9)
Problem
226(1)
Solution
226(1)
How It Works
226(9)
3-12 Querying Network Reachability
235(2)
Problem
235(1)
Solution
235(1)
How It Works
235(2)
3-13 Transferring Data with NFC
237(8)
Problem
237(1)
Solution
238(1)
How It Works
238(7)
3-14 Connecting over USB
245(10)
Problem
245(1)
Solution
246(1)
How It Works
246(9)
3-15 Scanning for Bluetooth Low Energy beacons
255(3)
Problem
255(1)
Solution
255(1)
How It Works
256(2)
Summary
258(1)
Chapter 4 Interacting with Device Hardware and Media 259(108)
4-1 Integrating Device Location
259(7)
Problem
259(1)
Solution
259(1)
How It Works
260(6)
4-2 Mapping Locations
266(9)
Problem
266(1)
Solution
266(3)
How It Works
269(6)
4-3 Annotating Maps
275(16)
Problem
275(1)
Solution
275(1)
How It Works
275(16)
4-4 Monitoring Location Regions
291(10)
Problem
291(1)
Solution
292(1)
How It Works
292(9)
4-5 Capturing Images and Video
301(6)
Problem
301(1)
Solution
301(1)
How It Works
301(6)
4-6 Making a Custom Camera Overlay
307(6)
Problem
307(1)
Solution
307(1)
How It Works
307(6)
4-7 Recording Audio
313(3)
Problem
313(1)
Solution
313(1)
How It Works
314(2)
4-8 Capturing Custom Video
316(4)
Problems
316(1)
Solution
316(1)
How It Works
316(4)
4-9 Adding Speech Recognition
320(3)
Problem
320(1)
Solution
320(1)
How It Works
321(2)
4-10 Playing Back AudioNideo
323(8)
Problem
323(1)
Solution
323(1)
How It Works
323(8)
4-11 Playing Sound Effects
331(3)
Problem
331(1)
Solution
331(1)
How It Works
332(2)
4-12 Creating a Tilt Monitor
334(4)
Problem
334(1)
Solution
334(1)
How It Works
334(4)
4-13 Monitoring Compass Orientation
338(4)
Problem
338(1)
Solution
338(1)
How It Works
339(3)
4-14 Retrieving Metadata from Media Content
342(4)
Problem
342(1)
Solution
342(1)
How It Works
342(4)
4-15 Detecting User Motion
346(11)
Problem
346(1)
Solution
346(1)
How It Works
347(10)
4-16 Making Applications Context Aware
357(5)
Problem
357(1)
Solution
357(5)
4-17 Authenticating Users Using Fingerprint Reader
362(2)
Problem
362(1)
Solution
362(2)
4-18 Scanning QR Codes Using Vision API
364(2)
Problem
364(1)
Solution
364(2)
Summary
366(1)
Chapter 5 Persisting Data 367(76)
5-1 Making a Preference Screen
367(6)
Problem
367(1)
Solution
367(1)
How It Works
367(6)
5-2 Displaying Custom Preferences
373(6)
Problem
373(1)
Solution
373(1)
How It Works
374(5)
5-3 Persisting Simple Data
379(4)
Problem
379(1)
Solution
379(1)
How It Works
379(4)
5-4 Reading and Writing Files
383(8)
Problem
383(1)
Solution
383(1)
How It Works
384(7)
5-5 Using Files as Resources
391(2)
Problem
391(1)
Solution
391(1)
How It Works
391(2)
5-6 Managing a Database
393(5)
Problem
393(1)
Solution
393(1)
How It Works
393(5)
5-7 Querying a Database
398(2)
Problem
398(1)
Solution
398(1)
How It Works
399(1)
5-8 Backing Up Data
400(4)
Problem
400(1)
Solution
400(1)
How It Works
400(4)
5-9 Sharing Your Database
404(8)
Problem
404(1)
Solution
405(1)
How It Works
405(7)
5-10 Sharing Your SharedPreferences
412(9)
Problem
412(1)
Solution
412(1)
How It Works
413(8)
5-11 Sharing Your Other Data
421(7)
Problem
421(1)
Solution
421(1)
How It Works
422(6)
5-12 Integrating With System Documents
428(14)
Problem
428(1)
Solution
428(1)
How It Works
429(13)
Summary
442(1)
Chapter 6 Interacting with the System 443(142)
6-1 Notifying from the Background
443(23)
Problem
443(1)
Solution
443(1)
How It Works
443(23)
6-2 Creating limed and Periodic Tasks
466(2)
Problem
466(1)
Solution
466(1)
How It Works
466(2)
6-3 Scheduling a Periodic Task
468(8)
Problem
468(1)
Solution
468(1)
How It Works
469(7)
6-4 Creating Sticky Operations
476(5)
Problem
476(1)
Solution
476(1)
How It Works
477(4)
6-5 Running Persistent Background Operations
481(7)
Problem
481(1)
Solution
481(1)
How It Works
481(7)
6-6 Launching Other Applications
488(4)
Problem
488(1)
Solution
488(1)
How ft Works
488(4)
6-7 Launching System Applications
492(4)
Problem
492(1)
Solution
492(1)
How ft Works
492(4)
6-8 Letting Other Applications Launch Your Application
496(3)
Problem
496(1)
Solution
496(1)
How It Works
497(2)
6-9 Interacting with Contacts
499(8)
Problem
499(1)
Solution
499(1)
How ft Works
499(8)
6-10 Reading Device Media and Documents
507(4)
Problem
507(1)
Solution
507(1)
How It Works
508(3)
6-11 Saving Device Media and Documents
511(5)
Problem
511(1)
Solution
511(1)
How It Works
512(4)
6-12 Reading Messaging Data
516(12)
Problem
516(1)
Solution
516(2)
How It Works
518(10)
6-13 Interacting with the Calendar
528(6)
Problem
528(1)
Solution
528(1)
How It Works
528(6)
6-14 Logging Code Execution
534(3)
Problem
534(1)
Solution
534(1)
How It Works
534(3)
6-15 Creating a Background Worker
537(4)
Problem
537(1)
Solution
537(1)
How It Works
537(4)
6-16 Customizing the Task Stack
541(8)
Problem
541(1)
Solution
541(1)
How It Works
542(7)
6-17 Implementing AppWidgets
549(21)
Problem
549(1)
Solution
549(1)
How It Works
550(20)
6-18 Supporting Restricted Profiles
570(14)
Problem
570(1)
Solution
570(1)
How It Works
571(13)
Summary
584(1)
Chapter 7 Graphics and Drawing 585(70)
7-1 Creating Drawables as Backgrounds
585(8)
Problem
585(1)
Solution
585(1)
How It Works
586(7)
7-2 Creating Custom State Drawables
593(5)
Problem
593(1)
Solution
593(1)
How It Works
593(5)
7-3 Applying Masks to Images
598(11)
Problem
598(1)
Solution
598(1)
How It Works w
599(10)
7-4 Drawing over View Content
609(16)
Problem
609(1)
Solution
609(1)
How tt Works
610(15)
7-5 High-Performance Drawing
625(12)
Problem
625(1)
Solution
626(1)
How It Works
626(11)
7-6 Custom Drawables
637(2)
Problem
637(1)
Solution
637(1)
How It Works
637(2)
7-7 Tinting Drawable Elements
639(5)
Problem
639(1)
Solution
639(1)
How It Works
639(5)
7-8 Using Scalable Vector Assets
644(9)
Problem
644(1)
Solution
644(1)
How It Works
645(8)
Summary
653(2)
Chapter 8 Working with Android NDK and RenderScript 655(44)
Android NDK
655(3)
8-1 Adding Native Bits with JNI
658(7)
Problem
658(1)
Solution
658(1)
How It Works
659(6)
8-2 Building a Purely Native Activity
665(9)
Problem
665(1)
Solution
665(1)
How It Works
666(8)
RenderScript
674 (2)
Using the RenderScript Support Package
675(1)
8-3 Filtering Images with RenderScript
676(5)
Problem
676(1)
Solution
676(1)
How It Works
676(5)
8-4 Manipulating Images with RenderScript
681(6)
Problem
681(1)
Solution
681(1)
How It Works
681(6)
8-5 Faking Translucent Overlays with Blur
687(10)
Problem
687(1)
Solution
687(1)
How It Works
688(9)
Summary
697(2)
Index 699
Dave Smith is a professional engineer developing hardware and software for mobile and embedded platforms. Dave's engineering efforts are currently focused full-time on Android and iOS development. Since 2009, Dave has worked on developing at all levels of the Android platform, from writing user applications using the software development kit, to building and customizing the Android source code.