O'Reilly - Android Cookbook.pdf
(
8683 KB
)
Pobierz
Android Cookbook
Android Cookbook
Android Cookbook
Android Community Experts
Beijing
•
Cambridge
•
Farnham
•
Köln
•
Sebastopol
•
Tokyo
Android Cookbook
by Android Community Experts
Copyright © 2011 Ian Darwin and Contributors. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions
are also available for most titles (
http://safari.oreilly.com
)
. For more information, contact our corporate/
institutional sales department: (800) 998-9938 or
corporate@oreilly.com
.
Editor:
Ian F. Darwin
Production Editor:
Copyeditor:
Proofreader:
Indexer:
Cover Designer:
Interior Designer:
Illustrators:
and
November 2011: First Edition.
Revision History for the First Edition:
See
http://oreilly.com/catalog/errata.csp?isbn=9781449388416
for release details.
Android is a trademark of Google, Inc. for their open-source operating environment for mobile devices.
Linux is a trademark of Linus Torvalds. Java is a trademark of Oracle America Corporation (formerly
Sun Microsystems).
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of
O’Reilly Media, Inc. !!FILL THIS IN!! and related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations uses by manufacturers and sellers to distinguish their products are claimed as
trademarks. Where those designations appear in this book, and O’Reilly Media, Inc. was aware of a
trademark claim, the designations have been printed in caps or initial caps
While every precaution has been taken in the preparation of this book, the publisher and authors assume
no responsibility for errors or omissions, or for damages resulting from the use of the information con-
tained herein.
ISBN: 978-1-449-38841-6
[?]
1318018084
Table of Contents
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Introduction: Getting Started 1
1.2 Learning the Java Language 1
1.3 Hello World - Command Line 3
1.4 Hello World - Eclipse Version 5
1.5 Set Up an Android Virtual Device for Apps Testing 10
1.6 Set Up an IDE on Windows to Develop for Android 23
1.7 Android Lifecycle 32
1.8 Opening a Web Page, Phone Number or anything else with an Intent 33
1.9 Email Text From a View
35
1.10 Sending an email with attachments
38
1.11 Installing .apk files on the emulator
40
1.12 Installing apps onto an Android Emulator
40
1.13 Android Epoch HTML/Javascript Calendar
43
1.14 Sharing Java classes from another Eclipse Project
48
1.15 Referencing libraries to implement external functionality
49
1.16 Use SDK Samples to Help Avoid Head Scratching
50
1.17 Keeping the Android SDK Updated
55
1.18 Five Ways to Wire Up an Event Listener
61
1.19 Taking a Screenshot from the Emulator/Android Device
69
1.20 Program: A Simple CountDownTimer example
70
1.21 Program: Tipster, a tip calculator for the Android OS
73
2. Designing a successful Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
2.1 Introduction: Designing a Successful Android application
91
2.2 Keeping a Service running while other apps are on display
95
2.3 Starting a service after phone reboot
97
2.4 Exception Handling
98
2.5 Sending/Receive broadcast message
100
v
Plik z chomika:
tombula
Inne pliki z tego folderu:
Building Android Apps with HTML CSS and JavaScript 2nd Ed.pdf
(10600 KB)
O'Reilly - Android Cookbook.pdf
(8683 KB)
Inne foldery tego chomika:
Ada
Agile
AI - Robotyka
AJAX
C - C++
Zgłoś jeśli
naruszono regulamin