TheNewBoston
Social Network for Programmers
Android App Development for Beginners
(https://www.thenewboston.com/videos.php?cat=120)
Android App Development
(https://www.thenewboston.com/videos.php?cat=6)
Get Started with Android Studio
(http://developer.android.com/develop/index.html)
Everything you need to build incredible app experiences on phones and tablets, Wear, TV, and Auto.
Building Your First App
(http://developer.android.com/training/basics/firstapp/index.html)
This class teaches you how to build your first Android app. You’ll learn how to create an Android project and run a debuggable version of the app. You’ll also learn some fundamentals of Android app design, including how to build a simple user interface and handle user input.
Android Development for Beginners –How to Make an Android App
(https://www.udacity.com/course/android-development-for-beginners–ud837)
Smyth, N. (2014) Android 4.4 App Development Essentials, eBookFrenzy
Download Source Code (ZIP 26,024KB)
The goal of this book is to teach the skills necessary to develop Android based applications using the Eclipse Integrated Development Environment (IDE) and the Android 4.4 Software Development Kit (SDK).
Beginning with the basics, this book provides an outline of the steps necessary to set up an Android development and testing environment. An introduction to the architecture of Android is followed by an in-depth look at the design of Android applications and user interfaces. More advanced topics such as database management, content providers and intents are also covered, as are touch screen handling, gesture recognition, camera access and the playback and recording of both video and audio. This edition of the book also covers features introduced with Android 4.4 including printing, transitions and cloud-based file storage.
In addition to covering general Android development techniques, the book also includes Google Play specific topics such as implementing maps using the Google Maps Android API, In-App purchasing and submitting apps to the Google Play Developer Console.
Assuming you already have some Java programming experience, are ready to download Eclipse and the Android SDK, have access to a Windows, Mac or Linux system and ideas for some apps to develop, you are ready to get started.
Book Contents
- Setting up an Android Development Environment
- Creating an Android Virtual Device (AVD)
- Creating an Example Android Application
- Testing Android Applications on a Physical Android Device with ADB
- An Overview of the Android Architecture
- The Anatomy of an Android Application
- Understanding Android Application and Activity Lifecycles
- Handling Android Activity State Changes
- Android Activity State Changes – An Example Application
- Saving and Restoring the User Interface State of an Android Activity
- Understanding Android Views, View Groups and Layouts
- Designing an Android User Interface using the Graphical Layout Tool
- Creating an Android User Interface in Java Code
- Using the Android GridLayout Manager in the Graphical Layout Tool
- Working with the Android GridLayout in XML Layout Resources
- An Overview and Example of Android Event Handling
- Detecting Common Gestures using the Android Gesture Detector Class
- Implementing Android Custom Gesture and Pinch Recognition
- An Introduction to Android Fragments
- Using Fragments in Android – A Worked Example
- An Android Master/Detail Flow Tutorial
- Creating and Managing Overflow Menus on Android
- Animating User Interfaces with the Android Transitions Framework
- An Android Transition Tutorial using beginDelayedTransition
- Implementing Android Scene Transitions – A Tutorial
- An Overview of Android Intents
- Android Explicit Intents – A Worked Example
- Android Implicit Intents – A Worked Example
- Android Broadcast Intents and Broadcast Receivers
- A Basic Overview of Android Threads and Thread handlers
- An Overview of Android Started and Bound Services
- Implementing an Android Started Service – A Worked Example
- Android Local Bound Services – A Worked Example
- Android Remote Bound Services – A Worked Example
- An Overview of Android SQLite Databases
- An Android TableLayout and TableRow Tutorial
- An Android SQLite Database Tutorial
- Understanding Android Content Providers
- An Android Content Provider Tutorial
- Accessing Cloud Storage using the Android Storage Access Framework
- An Android Storage Access Framework Example
- Implementing Video Playback on Android using the VideoView and MediaController Classes
- Video Recording and Image Capture on Android using Camera Intents
- Android Audio Recording and Playback using MediaPlayer and MediaRecorder
- Working with the Google Maps Android API
- Printing with the Android Printing Framework
- An Android HTML and Web Content Printing Example
- A Guide to Android Custom Document Printing
- Handling Different Android Devices and Displays
- Signing and Preparing an Android Application for Release
- Integrating Google Play In-app Billing into an Android Application
Frederick, G. R. and Lal, R. (2009) Beginning Smartphone Web Development – Building Javascript, CSS, HTML and Ajax-Based Applications for iPhone, Android, Palm Pre, Blackberry, Windows Mobile and Nokia S60, Apress
Download eBook PDF (PDF 8,180KB)
Today’s Web 2.0 applications (think Facebook and Twitter) go far beyond the confines of the desktop and are widely used on mobile devices. The mobile Web has become incredibly popular given the success of the iPhone and BlackBerry, the importance of Windows Mobile, and the emergence of Palm Pre (and its webOS platform). At Apress, we are fortunate to have Gail Frederick of the well-known training site Learn the Mobile Web offer her expert advice in Beginning Smartphone Web Development. In this book, Gail teaches the web standards and fundamentals specific to smartphones and other feature-driven mobile phones and devices.
- Shows you how to build interactive mobile web sites using web technologies optimized for browsers in smartphones
- Details markup fundamentals, design principles, content adaptation, usability, and interoperability
- Explores cross-platform standards and best practices for the mobile Web authored by the W3C, dotMobi, and similar organizations
- Dives deeps into the feature sets of the most popular mobile browsers, including WebKit, Chrome, Palm Pre webOS, Pocket IE, Opera Mobile, and Skyfire
By the end of this book, you’ll have the training, tools, and techniques for creating robust mobile web experiences on any of these platforms for your favorite smartphone or other mobile device.
What you’ll learn
- Build interactive mobile web pages that comply with industry standards and best practices.
- Develop web sites using the markup languages of the mobile Web: XHTML-MP, Wireless CSS, and WML.
- Use Mobile JavaScript and Ajax for client-side web interactivity.
- Adapt the syntax and design of mobile web pages to target smartphone models.
- Enhance mobile web pages to target advanced features of smartphone browsers.
- Validate and compress mobile markup to optimize for network transmission and browser performance.
- Simulate smartphone browsers using emulators and development tools.
Who this book is for
Mobile application developers and their managers need to learn mobile web technologies because it’s in their economic interest. Time-to-market and opportunity costs are significantly lower for web-based mobile applications than for native ones.
Desktop web developers at software companies and IT departments of non-technology businesses need to learn mobile web technologies to meet the demands of managers who will soon be asking them to “mobilize this web site.” These developers will want to do the minimum work possible to maximize the compatibility of their mobile web sites. The standards-based approach advocated in this book will allow them to build gracefully adaptive and portable mobile web experiences that perform well across mobile browser platforms.
Table of Contents
- Introduction to Mobile Web Development
- Set Up Your Mobile Web Development Environment
- Mobile Markup Languages
- Device Awareness and Content Adaptation
- Adding Interactivity with JavaScript and AJAX
- Mobile Web Usability
- Enhancing Mobile Web Pages for Smartphone Browsers
- Optimizing Mobile Markup
- Validating Mobile Markup
- Testing a Mobile Web Site
- Deploying a Mobile Web Site
- How to Play Well in the Mobile Ecosystem
- The Future of the Mobile Web
Wei-Meng, L. (2012) Beginning Android 4 Application Development, Wrox, Wiley and Sons, Inc
There is a newer edition of this book
Download eBook PDF (PDF 61,063KB)
Download all Source Code from: http://www.wrox.com/WileyCDA/WroxTitle/Beginning-Android-Application-Development.productCd-1118017110,descCd-DOWNLOAD.html
Understand Android OS for both smartphone and tablet programmingThis fast–paced introduction to the newest release of Android OS gives aspiring mobile app developers what they need to know to program for today′s hottest Android smartphones and tablets. Android 4 OS is, for the first time, a single solution for both smartphones and tablets, so if you master the information in this helpful guide, you′ll be well on your way to successful development for both devices. From using activities and intents and creating rich user interfaces to working with SMS, messaging APIs, and the Android SDK, what you need is here.
- Provides clear instructions backed by real–world programming examples
- Begins with the basics and covers everything Android 4 developers need to know for both smartphones and tablets
- Explains how to customize activities and intents, create rich user interfaces, and manage data
- Helps you work with SMS and messaging APIs, the Android SDK, and using location–based services
- Details how to package and publish your applications to the Android Market
Beginning Android 4 Application Development pares down the most essential steps you need to know so you can start creating Android applications today.
Create must-have applications for the latest Android OSThe Android OS is a popular and flexible platform for many of today’s most in-demand mobile devices. This full-color guide offers you a hands-on introduction to creating Android applications for the latest mobile devices. Veteran author Wei Meng Lee accompanies each lesson with real-world examples to drive home the content he covers. Beginning with an overview of core Android features and tools, he moves at a steady pace while teaching everything you need to know to successfully develop your own Android applications.
- Explains what an activity is and reviews its lifecycle
- Zeroes in on customizing activities by applying styles and themes
- Looks at the components of a screen, including LinearLayout, AbsoluteLayout, and RelativeLayout, among others
- Details ways to adapt to different screen sizes and adjust display orientation
- Reviews the variety of views such as TextView, ProgressBar, TimePicker, and more
Beginning Android Application Development pares down the most essential steps you need to know so you can start creating Android applications today.
Table of Contents
INTRODUCTION xxi
CHAPTER 1: GETTING STARTED WITH ANDROID PROGRAMMING 1
What Is Android? 2
Android Versions 2
Features of Android 3
Architecture of Android 4
Android Devices in the Market 6
The Android Market 8
The Android Developer Community 9
Obtaining the Required Tools 9
Android SDK 10
Installing the Android SDK Tools 11
Confi guring the Android SDK Manager 12
Eclipse 14
Android Development Tools (ADT) 15
Creating Android Virtual Devices (AVDs) 17
Creating Your First Android Application 20
Anatomy of an Android Application 29
Summary 33
CHAPTER 2: ACTIVITIES, FRAGMENTS, AND INTENTS 35
Understanding Activities 36
Applying Styles and Themes to an Activity 41
Hiding the Activity Title 41
Displaying a Dialog Window 42
Displaying a Progress Dialog 47
Displaying a More Sophisticated Progress Dialog 50
Linking Activities Using Intents 53
Resolving Intent Filter Collision 58
Returning Results from an Intent 59
Passing Data Using an Intent Object 63
Fragments 69
Adding Fragments Dynamically 73
Life Cycle of a Fragment 76
Interactions between Fragments 80
Calling Built–In Applications Using Intents 85
Understanding the Intent Object 89
Using Intent Filters 91
Adding Categories 96
Displaying Notifications 98
Summary 103
CHAPTER 3: GETTING TO KNOW THE ANDROID USER INTERFACE 105
Understanding the Components of a Screen 105
Views and ViewGroups 106
LinearLayout 107
AbsoluteLayout 115
TableLayout 116
RelativeLayout 117
FrameLayout 118
ScrollView 121
Adapting to Display Orientation 123
Anchoring Views 125
Resizing and Repositioning 127
Managing Changes to Screen Orientation 130
Persisting State Information during Changes in Confi guration 133
Detecting Orientation Changes 135
Controlling the Orientation of the Activity 135
Utilizing the Action Bar 136
Adding Action Items to the Action Bar 139
Customizing the Action Items and Application Icon 144
Creating the User Interface Programmatically 146
Listening for UI Notifications 148
Overriding Methods Defined in an Activity 149
Registering Events for Views 152
Summary 156
CHAPTER 4: DESIGNING YOUR USER INTERFACE WITH VIEWS 159
Using Basic Views 160
TextView View 160
Button, ImageButton, EditText, CheckBox, ToggleButton, RadioButton, and RadioGroup Views 161
ProgressBar View 171
AutoCompleteTextView View 177
Using Picker Views 179
TimePicker View 179
DatePicker View 184
Using List Views to Display Long Lists 191
ListView View 191
Using the Spinner View 199
Understanding Specialized Fragments 202
Using a ListFragment 202
Using a DialogFragment 207
Using a PreferenceFragment 210
Summary 214
CHAPTER 5: DISPLAYING PICTURES AND MENUS WITH VIEWS 219
Using Image Views to Display Pictures 219
Gallery and ImageView Views 220
ImageSwitcher 226
GridView 231
Using Menus with Views 234
Creating the Helper Methods 235
Options Menu 238
Context Menu 240
Some Additional Views 242
AnalogClock and DigitalClock Views 242
WebView 243
Summary 249
CHAPTER 6: DATA PERSISTENCE 251
Saving and Loading User Preferences 251
Accessing Preferences Using an Activity 252
Programmatically Retrieving and Modifying the Preferences Values 259
Changing the Default Name of the Preferences File 261
Persisting Data to Files 263
Saving to Internal Storage 263
Saving to External Storage (SD Card) 268
Choosing the Best Storage Option 271
Using Static Resources 272
Creating and Using Databases 273
Creating the DBAdapter Helper Class 273
Using the Database Programmatically 279
Pre–Creating the Database 285
Summary 289
CHAPTER 7: CONTENT PROVIDERS 293
Sharing Data in Android 293
Using a Content Provider 294
Predefi ned Query String Constants 300
Projections 303
Filtering 304
Sorting 305
Creating Your Own Content Providers 305
Using the Content Provider 314
Summary 319
CHAPTER 8: MESSAGING 321
SMS Messaging 321
Sending SMS Messages Programmatically 322
Getting Feedback after Sending a Message 325
Sending SMS Messages Using Intent 328
Receiving SMS Messages 329
Caveats and Warnings 344
Sending E–mail 345
Summary 347
CHAPTER 9: LOCATION–BASED SERVICES 351
Displaying Maps 352
Creating the Project 352
Obtaining the Maps API Key 353
Displaying the Map 355
Displaying the Zoom Control 358
Changing Views 361
Navigating to a Specific Location 363
Adding Markers 366
Getting the Location That Was Touched 369
Geocoding and Reverse Geocoding 371
Getting Location Data 375
Monitoring a Location 384
Project ― Building a Location Tracker 385
Summary 390
CHAPTER 10: NETWORKING 393
Consuming Web Services Using HTTP 393
Downloading Binary Data 396
Downloading Text Content 402
Accessing Web Services Using the GET Method 404
Consuming JSON Services 409
Sockets Programming 417
Summary 426
CHAPTER 11: DEVELOPING ANDROID SERVICES 429
Creating Your Own Services 429
Performing Long–Running Tasks in a Service 433
Performing Repeated Tasks in a Service 439
Executing Asynchronous Tasks on Separate Threads Using IntentService 442
Establishing Communication between a Service and an Activity 445
Binding Activities to Services 449
Understanding Threading 454
Summary 460
CHAPTER 12: PUBLISHING ANDROID APPLICATIONS 463
Preparing for Publishing 463
Versioning Your Application 464
Digitally Signing Your Android Applications 466
Deploying APK Files 471
Using the adb.exe Tool 471
Using a Web Server 474
Publishing on the Android Market 476
Summary 481
APPENDIX A: USING ECLIPSE FOR ANDROID DEVELOPMENT 483
Getting Around in Eclipse 483
Workspaces 483
Package Explorer 485
Using Projects from Other Workspaces 486
Using Editors within Eclipse 487
Understanding Eclipse Perspectives 490
Automatically Importing Packages 490
Using the Code Completion Feature 491
Refactoring 492
Debugging your Application 494
Setting Breakpoints 495
Dealing with Exceptions 497
APPENDIX B: USING THE ANDROID EMULATOR 499
Uses of the Android Emulator 499
Creating Snapshots 501
SD Card Emulation 502
Emulating Devices with Different Screen Sizes 504
Emulating Physical Capabilities 506
Sending SMS Messages to the Emulator 508
Making Phone Calls 509
Transferring Files into and out of the Emulator 511
Resetting the Emulator 513
APPENDIX C: ANSWERS TO EXERCISES 515
Burnette, Ed. (2015) Hello, Android: Introducing Google’s Mobile Development Platform, Fourth Edition,The Pragmatic Bookshelf
Download Source Code (ZIP 9.2MB)
Companion Web Site: https://pragprog.com/book/eband4/hello-android
Google Android dominates the mobile market, and by targeting Android, your apps can run on most of the phones and tablets in the world. This new fourth edition of the #1 book for learning Android covers all modern Android versions from Android 4.1 through Android 5.0. Freshly added material covers new Android features such as Fragments and Google Play Services. Android is a platform you can’t afford not to learn, and this book gets you started.
Android is a software toolkit for mobile phones and tablets, created by Google. It’s inside more than a billion devices, making Android the number one platform for application developers. Your own app could be running on all those devices!
Getting started developing with Android is easy. You don’t even need access to an Android phone, just a computer where you can install the Android SDK and the emulator that comes with it. Within minutes, Hello, Android gets you creating your first working application: Android’s version of “Hello, World.” From there, you’ll build up a more substantial example: an Ultimate Tic-Tac-Toe game. By gradually adding features to the game, you’ll learn about many aspects of Android programming, such as creating animated user interfaces, playing music and sound effects, building location-based services (including GPS and cell-tower triangulation), and accessing web services. You’ll also learn how to publish your applications to the Google Play Store.
This fourth edition of the bestselling Android classic has been revised for Android 4.1-4.3 (Jelly Bean), 4.4 (KitKat), and Android 5.0 (Lollipop). Topics have been streamlined and simplified based on reader feedback, and every page and example has been reviewed and updated for compatibility with the latest versions of Android.
If you’d rather be coding than reading about coding, this book is for you.
Android is a software toolkit for mobile phones and tablets, created by Google. It’s inside more than a billion devices, making Android the number one platform for application developers. Your own app could be running on all those devices!
Getting started developing with Android is easy. You don’t even need access to an Android phone, just a computer where you can install the Android SDK and the emulator that comes with it. Within minutes, Hello, Android gets you creating your first working application: Android’s version of “Hello, World.” From there, you’ll build up a more substantial example: an Ultimate Tic-Tac-Toe game. By gradually adding features to the game, you’ll learn about many aspects of Android programming, such as creating animated user interfaces, playing music and sound effects, building location-based services (including GPS and cell-tower triangulation), and accessing web services. You’ll also learn how to publish your applications to the Google Play Store.
This fourth edition of the bestselling Android classic has been revised for Android 4.1-4.3 (Jelly Bean), 4.4 (KitKat), and Android 5.0 (Lollipop). Topics have been streamlined and simplified based on reader feedback, and every page and example has been reviewed and updated for compatibility with the latest versions of Android.
If you’d rather be coding than reading about coding, this book is for you.
Top Five Android Development Tips by Ed Burnette
1. Use Android Studio. Android Studio has replaced Eclipse as the go-to IDE for Android development. It features increased speed and stability, native support for gradle builds, and a fanstastic user interface editor.
2. Understand the Activity and Fragment lifecycle. Android development is not like development for desktop applications. The system controls when your app is launched, paused, resumed, and terminated. It calls methods you write, such as onStart(), to tell you what is about to happen. Your job is to play nicely with the system and be a good Android app citizen. Your users will thank you!
3. Target the latest version of Android. To maintain compatibility with the widest possible range of devices, you should always use the latest build tools and set the target SDK to the most recent version of Android. Your app can still work on older versions through clever uses of version testing and alternate resources.
4. Keep long-running tasks in the background. The smooth performance of your app is paramount. Long-running tasks such as network and database I/O must not be allowed to interfere with that performance. The solution? Use threads and Loaders to offload that work to a background thread.
5. Remember, logging is your friend. Sure, IDEs like Android Studio come with a fancy debugger, and you’ll have to use that from time to time. But often, simpler is better. A few well-placed messages in the Android log can help you diagnose problems quickly, even hard to reproduce ones.
Contents & Extracts
- Introducing Android
- Quick Start
- Installing the Tools
- Creating Your First Program
- Running on the Android Emulator
- Running on a Real Device
- Additional Steps
- Fast-Forward >>
- Key Concepts excerpt
- The Big Picture
- Building Blocks
- It’s Alive!
- Safe and Secure
- Fast-Forward >>
- Quick Start
- Let’s Play a Game
- Opening Moves
- Creating the Tic-Tac-Toe Example
- Designing in XML
- Filling In the Code
- Adding an About Box
- Defining Resources
- Debugging
- Fast-Forward >>
- Defining the Game Interface
- The Game Board
- Starting a Game
- Controlling the Game
- Super-Size Me
- Fast Forward >>
- Ghost in the Machine
- Introduction to AI
- Simulating Thought
- Making Your Move
- Fast Forward >>
- Adding Sounds
- The Sound of Music
- Music To Play By
- It Goes Ding When There’s Stuff
- Fast Forward >>
- Adding Animation
- The Never-Ending Scroller
- Bouncing Tiles
- Fast Forward >>
- Opening Moves
- Thinking Outside the Box
- Write Once, Test Everywhere
- Gentlemen, Start Your Emulators
- The Good, The Bad,…
- All Screens Great and Small
- Fast-Forward >>
- Publishing to the Play Store
- Preparing
- Signing
- Testing
- Publishing
- Updating
- Tips
- Fast-Forward >>
- Write Once, Test Everywhere
- Beyond the Basics
- Connecting to the World
- Browsing by Intent
- Web with a View
- From JavaScript to Java and Back
- Fast-Forward >>
- Calling Web Services excerpt
- Using Web Services
- The Suggest Example
- Threading the Needle
- Loose Ends
- The Suggest Task
- Fast-Forward >>
- Using Google Play Services excerpt
- How It Works
- Using Location Services
- Fast Forward >>
- Putting SQL to Work
- Introducing SQLite
- SQL 101
- Hello, Database
- Data Binding
- Using a ContentProvider
- Implementing a ContentProvider
- Using Loaders
- Closing Thoughts
- Connecting to the World
- Appendixes
- Java vs. the Android Language and APIs
- Language Subset
- Standard Library Subset
- Third-Party Libraries
- Bibliography
- Java vs. the Android Language and APIs