Android Essentials(1).pdf
(
1117 KB
)
Pobierz
64299581 UNPDF
Available as a
PDF Electronic Book
or
Print On Demand
Essentials
116
PAGES
Chris Haseman
Android
About firstPress
Apress's
firstPress
series is your source for understanding cutting-edge technology. Short,
highly focused, and written by experts, Apress's firstPress books save you time and effort. They
contain the information you could get based on intensive research yourself or if you were to
attend a conference every other week—if only you had the time. They cover the concepts and
techniques that will keep
you
ahead of the technology curve. Apress's firstPress books are real
books, in your choice of electronic or print-on-demand format, with no rough edges even when
the technology itself is still rough. You can't afford to be without them.
Android Essentials
Dear Reader,
This book covers the essential information required to build an Android application. It will help
any developer, amateur, professional, or dabbler who is interested in developing for Android.
Over the course of the book, I cover the essentials you’ll need to get started with your own
innovative application. I took on this project because, after five years of working in the mobile
software industry, it has become clear that we need help. With mobile devices becoming more
ubiquitous, powerful, and, indeed, essential, fresh blood is necessary to overcome the stagnation
that has plagued our business. As an industry, we need to graduate from making cookie-cutter
ringtones, wallpaper, and e-mail applications. I hope, once you’ve finished this book, that you’ll
be in a position to start that killer mobile product you’ve told all your friends you’re going to
make.
In
Android Essentials
, I cover the details of installing and using the Android SDK,
making and rendering user interface tools, harnessing location tracking and Google Maps, and
putting everything together with a little glue from XML parsers and networking clients. These
tools and tricks should be enough to get you past your empty editor, the daunting blank canvas
of the developer world, and onto the path of your own innovative mobile app. Android
potentially represents our best hope for a break from the constricted world of mobile
development. Use it to make something amazing. I can’t wait to see what you create.
Regards,
Chris Haseman
Lead software engineer at Gravity Mobile
Contents
Chapter 1: Introduction ...............................................................
1
What You Need to Know to Start............................................................
1
How to Best Use This Book ....................................................................
2
Getting Started.........................................................................................
2
Installing Eclipse ...........................................................................................
3
Getting the Android SDK..............................................................................
3
Installing the Eclipse Plug-In ........................................................................
4
The Android Project................................................................................
5
Running, Debugging, and Causing General Mayhem..........................
8
Chapter 2: The Application ..........................................................
9
Getting Active ..........................................................................................
9
Getting Splashy ...........................................................................................
10
Creating the Intent Receiver.................................................................
19
Setting It Up ................................................................................................
19
Seeing the Intent Receiver in Action...........................................................
23
Triggering the Activity................................................................................
26
Who Do You Want to Humiliate Today? .............................................
29
Nervous with the Service ............................................................................
29
Zen and the Art of Getting Even .................................................................
33
Moving Data in Android .......................................................................
34
Shameless Self-Promotion ..........................................................................
36
Adding Evil Corporate URLS with a Content Resolver .............................
38
Android Essentials
i
Part of This Balanced Breakfast ..........................................................
39
Chapter 3: User Interface ..........................................................
41
Easy and Fast, the XML Layout...........................................................
42
Laying Out...................................................................................................
42
Scrolling, Text Entry, Buttons, and All the Simple Things in Life ...........
51
Waking Up the Widgets.........................................................................
55
Widgets in Java ...........................................................................................
59
Getting Under the Hood ..............................................................................
59
Custom UI Rendering with the Canvas................................................
67
Customizing the View .................................................................................
67
Creating the Game Loop .............................................................................
69
Bringing It All Together..............................................................................
74
Using the User Interface.......................................................................
74
Chapter 4: Location, Location, Location ......................................
75
Where Am I? .........................................................................................
75
Building the LocationManager Object ........................................................
76
Look Up, Wave, the Satellites Are Watching… .........................................
77
Google Maps..........................................................................................
80
A Metric Ton of Map Objects .....................................................................
80
Moving the Map ..........................................................................................
82
Taking Stock................................................................................................
84
It’s a Bird, It’s a Plane...Nope, It’s Bad Photoshoping ...............................
84
Wrapping Up ...............................................................................................
87
Chapter 5: Taking Android Out for a Walk...................................
89
Loading a List from the Web ................................................................
89
First Things…First? ....................................................................................
90
Getting the Network in Gear .......................................................................
92
ii
Android Essentials
Putting the Data in Its Place ........................................................................
94
Making a List and Checking It….........................................................
95
The Setup: Embracing the List....................................................................
95
Adding the Adapter .....................................................................................
96
Stuffing Data into the Adapter ....................................................................
98
At Last, Adding the Data.............................................................................
99
Selection… ................................................................................................
100
The Next Step ......................................................................................
102
Dressing Up the Menu...............................................................................
102
Looking Back ......................................................................................
106
Chapter 6: Tying on a Bow ......................................................
107
The Making of an Application ...........................................................
107
Looks Aren’t Everything, Except, of Course, When They Are ................
107
Location Isn’t Too Important, Except When You Need Pizza at 4 a.m....
108
Taking Off Android’s Leash and Letting It Romp Around the Internet ...
109
Overall .......................................................................................................
109
Other Sources of Information ............................................................
109
Getting Help ..............................................................................................
110
It’s Time to Stop Reading and Start Helping.....................................
110
Copyright ...............................................................................
112
Android Essentials
iii
Plik z chomika:
chordad
Inne pliki z tego folderu:
Beginning Android(1).pdf
(14866 KB)
Beginning Android 2(1).pdf
(10360 KB)
Android for Work(1).pdf
(8539 KB)
Android Programowanie aplikacji na Wydanie II [PL] [.pdf].torrent
(19 KB)
Android Essentials(1).pdf
(1117 KB)
Inne foldery tego chomika:
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
►Mapy Wojskowe Topograficzne Polski 1979-89 (3 CD)
00-AI
00-Algorithms-Information
Zgłoś jeśli
naruszono regulamin