1.4: Resources to help you learn
Contents:
- Exploring Android developer documentation
- Watching developer videos
- Exploring code samples in the Android SDK
- Using Activity templates
- Browsing the Android developer blog
- Other sources of information
- Related practical
This chapter describes resources available for Android developers, and how to use them.
Exploring Android developer documentation
The best place to learn about Android development and to keep informed about the newest Android development tools is to browse the official Android developer documentation.
The home page
This page contains a wealth of information kept current by Google. To start exploring, click the following links along the bottom of the page:
- Get Android Studio: Download Android Studio, the official integrated development environment (IDE) for building Android apps.
- Browse sample code: Browse the sample code library in GitHub to learn how to build different components for your apps. Each sample is a fully functioning Android app. The GitHub page lets you browse the resources and source files, and clone or download the app project. For more sample code, see "Exploring code samples in the Android SDK" in this chapter.
- Watch stories: Learn about other Android developers, their apps, and their successes with Android and Google Play. The page offers videos and articles with the newest stories about Android development, such as how developers improved their users' experiences, and how to increase user engagement with apps.
Android Studio page
After clicking Get Android Studio on the home page, the Android Studio page, shown above, appears with the following useful links:
- Download Android Studio: Download Android Studio for the computer operating system you are currently using.
- Read the docs: Browse the Android Studio documentation.
- See the release notes: Read the release notes for the newest version of Android Studio.
- Features: Learn about the features of the newest version of Android Studio.
- Latest: Read news about Android Studio.
- Resources: Read articles about using Android Studio, including a basic introduction.
- Videos: Watch video tutorials about using Android Studio.
- Download Options: Download a version of Android Studio for a different operating system than the one you are using.
Android Studio documentation
The following are links into the Android Studio documentation that are useful for this training:
- Meet Android Studio
- Developer Workflow Basics
- Projects Overview
- Create App Icons with Image Asset Studio
- Add Multi-Density Vector Graphics
- Create and Manage Virtual Devices
- Measure App Performance with Android Profiler
- Debug Your App
- Configure Your Build
- Sign Your App
Design
The Design link in the navigation drawer (left column) of the home page gives you access to Material Design, which is a conceptual design philosophy that outlines how apps should look and work on mobile devices. Use the following links to learn more:
- Introducing material design: An introduction to the material design philosophy.
- Downloads for designers: Download color palettes for compatibility with the material design specification.
- Articles: Read articles and news about Android design.
Scroll down the Design page for links to resources such as videos, templates, font, and color palettes. The following are links into the Design section that are useful for this training:
- Material Design Guidelines
- Style
- Using the Material Theme
- Components - Buttons
- Dialogs design guide
- Gestures design guide
- Notification Design Guide
- Icons and other downloadable resources
- Design - Patterns - Navigation
- Drawable Resource Guide
- Styles and Themes Guide
- Settings
- Material Palette Generator
- Android standard R.color resources
Develop
The Develop link in the navigation drawer (left column) of the home page provides a wealth of application programming interface (API) information, reference documentation, tutorials, tool guides, and code samples.
The following are popular links into the Develop section that are useful for this training:
- Introduction to Android
- Vocabulary Glossary
- Platform Architecture
- Android Application Fundamentals
- UI Overview
- Platform Versions
- Android Support Library
- Working with System Permissions
The following are articles that describe best development practices:
- Supporting Different Platform Versions
- Supporting Multiple Screens
- Supporting Different Densities
- Best Practices for Interaction and Engagement
- Best Practices for User Interface
- Best Practices for Testing
- Providing Resources
- Optimizing Downloads for Efficient Network Access Guide
- Best Practices for App Permissions
The following are useful articles and training guides:
- Starting Another Activity
- Specifying the Input Method Type
- Handling Keyboard Input
- Adding the App Bar
- Using Touch Gestures
- Creating Lists and Cards
- Getting Started with Testing
- Managing the Activity Lifecycle
- Connecting to the Network
- Managing Network Usage
- Manipulating Broadcast Receivers On Demand
- Scheduling Repeating Alarms
- Transferring Data Without Draining the Battery
- Saving Files
- Saving Key-Value Sets
- Saving Data in SQL Databases
- Configuring Auto Backup for Apps
- Working with System Permissions
The following are general topics covered in this training:
- App Resources
- Styles and Themes
- Layouts
- Menus
- Intents and Intent Filters
- Processes and threads
- Loaders
- Services
- Notifications
- Storage Options
- Localizing with Resources
- Content Providers
- Cursors
- Backing up App Data to the Cloud
- Settings
- System Permissions
Distribute
The Distribute link in the navigation drawer (left column) provides information about everything that happens after you've written your app: putting it on Google Play, Google's digital distribution system for apps developed with the Android SDK. Use the Google Play Console to grow your user base and start earning money. You can accept the Developer Agreement, pay the registration fee, and complete your account details in order to join the Google Play developer program.
See also:
Installing offline documentation
To access to documentation even when you are not connected to the internet, install the Software Development Kit (SDK) documentation using the SDK Manager. Follow these steps:
- Select Tools > Android > SDK Manager.
- In the left column, click Android SDK.
Select and copy the path for the Android SDK Location at the top of the screen, as you will need it to locate the documentation on your computer:
Click the SDK Tools tab. You can install additional SDK Tools that are not installed by default, as well as an offline version of the Android developer documentation.
- Click the checkbox for "Documentation for Android SDK" if it is not already installed, and click Apply.
- When the installation finishes, click Finish.
- Navigate to the sdk directory you copied above, and open the docs directory.
- Find index.html and open it.
Watching developer videos
In addition to the Android documentation, the Android Developers YouTube channel is a great source of tutorials and tips. You can subscribe to the channel to receive notifications of new videos by email. To subscribe, click the red Subscribe button in the upper right corner as shown below.
The following are popular videos referred to in this training:
- Debugging and Testing in Android Studio
- Android Testing Support - Android Testing Patterns #1
- Android Testing Support - Android Testing Patterns #2
- Android Testing Support - Android Testing Patterns #3
- Threading Performance 101
- Good AsyncTask Hunting
- Scheduling Alarms Presentation
- RecyclerView Animations and Behind the Scenes (Android Dev Summit 2015)
- Android Application Architecture: The Next Billion Users
- Android Performance Patterns Playlist
In addition, Udacity offers online Android development courses.
Exploring code samples in the Android SDK
You can explore hundreds of code samples directly in Android Studio. Select Import an Android code sample from the Android Studio welcome screen, or select File > New > Import Sample if you have already opened a project. The Browse Samples window appears as shown below.
Select a sample (such as Camera2Basic) and click Next. Accept or edit the Application name and Project location, and click Finish. The app project appears as shown below, and you can run the app in the emulator provided with Android Studio, or on a connected device.
Using Activity templates
Android Studio provides templates for common and recommended activity designs. Using templates saves time, and helps you follow best practices for developing activities.
Each template incorporates an skeleton activity and user interface. You select an activity template for the main activity when starting an app project. You can also add an activity template to an existing project. Right-click the java folder in Project > Android pane and select New > Activity > Gallery.
Browsing the Android developer blog
The Android Developers Blog provides a wealth of articles on Android development.
The following are popular blog posts:
- Welcoming Android 8.1 Oreo and Android Oreo (Go edition)
- Android Studio 3.0
- Quick Boot & the Top Features in the Android Emulator
- Double Stuffed Security in Android Oreo
- Making it safer to get apps on Android O
- Connecting your App to a Wi-Fi Device
- Linkify your Text!
- Holo Everywhere
- 5 Tips to help you improve game-as-a-service monetization
Other sources of information
Google and third parties offer a wide variety of helpful tips and techniques for Android development. The following are sources of information referenced by this training:
Google Developer Training: Whether you're new to programming or an experienced developer, Google offers a range of online courses to teach you Android development, from getting started to optimizing app performance. Click the Android tab at the top of the page.
Google I/O Codelabs: Google Developers Codelabs provide a guided hands-on coding experience on a number of topics. Most codelabs will step you through the process of building a small app, or adding a new feature to an existing app. Select Android from the Category drop-down menu on the right side of the page.
Android Testing Codelab: This codelab shows you how to get started with testing for Android, including testing integration in Android Studio, unit testing, hermetic testing, functional user interface testing, and the Espresso testing framework.
Google Testing Blog: This blog is focused on testing code. Blog posts referred to in the training include:
Stack Overflow: Stack Overflow is a community of millions of programmers helping each other. If you run into a problem, chances are someone else has already posted an answer on this forum. Examples referred to in the training include:
- How to assert inside a RecyclerView in Espresso?
- How do I Add A Fragment to a Custom Navigation Drawer Template?
- How do you create Preference Activity and Preference Fragment on Android?
- How to use SharedPreferences in Android to store, fetch and edit values
- How to populate AlertDialog from Arraylist?
- onSavedInstanceState vs. SharedPreferences
Google on GitHub: GitHub is a Git repository hosting service. It offers all of the distributed version control and source code management (SCM) functionality of Git as well as adding its own features. Git is a widely used version control system for software development. The following are hosted within GitHub and referred to in this training:
- Android Testing Samples
- Espresso cheat sheet
- Roman Nurik's Android Asset Studio
- Source code for exercises on GitHub
Miscellaneous sources of information referred to in this training:
- Codepath: Working with a TextView
- SQLite.org: Full description of the Query Language
- Atomic Object: "Espresso – Testing RecyclerViews at Specific Positions"
Google search: Enter a question into the Google search box, prefaced by "Android" to narrow your search. The Google search engine will collect relevant results from all of these resources. For example:
- "What is the most popular Android OS version in India?" This question collects results about Android market share, including the Dashboards page that provides an overview of device characteristics and platform versions that are active in the Android ecosystem.
- "Android Settings Activity" collects various articles about the Settings Activity including the Settings topic page, the
PreferenceActivity
class, and Stack Overflow's How do you create Preference Activity and Preference Fragment on Android? - "Android TextView" collects information about text views including the
TextView
class, theView
class, the Layouts topic page, and code samples from various sources. - Preface any search with "Android" to narrow your search to Android-related topics. For example, you can search for any Android class description, such as "Android TextView" or "Android activity".
Related practical
The related practical for this concept chapter is 1.4: Available resources.