DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Android 101: The Basics

Android 101: The Basics

James Sugrue user avatar by
James Sugrue
CORE ·
Oct. 04, 10 · Interview
Like (0)
Save
Tweet
Share
16.82K Views

Join the DZone community and get the full member experience.

Join For Free

right now in the world of software development, writing mobile apps has become very popular. there's never been more choice in frameworks and the amount of smartphones available. while writing for ios has been popular, it's android that has caught the attention of java developers. over the next few articles, i'll be taking you through some steps to get started with android. but before we get coding, let's take a look at some of the core principles of android development.

what is android?

the following diagram, taken from the online developer guide, shows the architecture of the android operating system:

the android is built on top of a linux kernel, for managing the typical operating system services. the android runtime is based on the dalvik virtual machine (subject of a lot of attention from oracle these days). dalvik is a slimmed down variation of the java virtual machine, which builds on the apache harmony java implementation. no javame, swing or awt components are provided; instead android provides it's own library of components.

there are a number of native libraries available, all written in c/c++. surface manager deals with access to the display subsystem, while the media libraries provide playback for most popular audio and video formats.

it's the application framework that will interest most developers as this provides the api and services that you need to create quality mobile applications for android.

the core android concepts

as mentioned above, the application framework has everything that a developer needs for creating apps. here's a rundown on the main concepts:

  • activities
    a activity is a user interface screen. one application can have one or more activities across the application's execution. each activity that you create will be given it's own window to draw in. each screen that you create will be a subclass of activity.
  • services
    a service runs as a background task, and has no visual representation. like activities, services run on the main application process thread, but will usually spawn off other threads to run their tasks without affecting other applications running. the typical example for a service is a music player, where you play songs from your playlist while doing other things on your phone. services extend the service base class.
  • content providers
    a content provider is a custom api that allows read and write access to a certain data set. this then allows different applications to share data between each other. content providers subclass the contentprovider base class which provides a standard interface for accessing data. applications will not call the contentprovider implementation directly, but will instead go through the contentresolver object, which can access any contentprovider.
  • intents
    an intent is a specific action such as sending an email, playing a song or calling a contact.
  • resources
    the final piece of the application jigsaw is resources - images, text or non-coded information that you application needs to access or display.

activity lifecycle

the following diagram illustrates the different states for an activity through it's lifecycle:

while you cannot control moving the activity between states, you will get notified as the state changes through the onx() methods like onstart(), onresume() etc. you can override these methods to get your application to react appropriately to these state changes.

next up

now that you have a better understanding of what makes up an android application, we're ready to get going with some real development. the next article will bring you through your system setup.

Android (robot) mobile app

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 11 Observability Tools You Should Know
  • A Gentle Introduction to Kubernetes
  • How To Choose the Right Streaming Database
  • Orchestration Pattern: Managing Distributed Transactions

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: