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 Basics Refresher

Android Basics Refresher

Alex Collins user avatar by
Alex Collins
·
Oct. 23, 10 · Interview
Like (0)
Save
Tweet
Share
9.32K Views

Join the DZone community and get the full member experience.

Join For Free

Covering the fundamentals of the hottest platform in mobile right now.

Reading through my Android notes today, I realised the quick-read format might be useful to others. Although fellow zoneleader James has been featuring some excellent articles on Android, I'd thought give my take in a simpler format - just in case it triggers your memory.

Android Basics

Every app;

  • runs in its own Linux process
  • shutdown when more resources needed
  • each process has its own VM
  • assigned its own user ID so its data is visible only to that user (and app)
  • can call upon components developed elsewhere to allow for reusability
Activity

An activity is a UI representing a task the user wants to perform, such as entering a phone number into a text-box, or a list of menu items the user must choose from. Applications are made up of many activities. A Java class must extend the Activity class.

Views, or 'widgets', are what make up the components in an activity. As subclasses of View, these represent standard items in a UI such as a button, textbox or Image.

Services, Broadcast Receivers and Content Providers Services

Run in the background. Extend the "Service" base class. The platform will start them by passing Intent to Context.startInstance(). "onStart()" will be called by Android on the instance of a new Service and an Intent passed to it. To get a hold of an established Service (i.e. one that's already running), you can call Context.bindService(); in such a scenario the Service is given an Intent instance and its onBind() method is called.

Broadcast Receivers

Receive and react to broadcast announcements. Examples would be battery is low, or the language has been changed. Extend BroadcastReceiver base class. They do not have a an interface and typically display an icon in the notification area.

Content Provider

Exposes one application's data to another. An extension of ContentProvider, these act on calls from ContentResolver (which other apps invoke) to access data controlled by this provider.

Intents

Activities are started by passing Intent instances to Context.startActivity() or Activity.startActivityForResult().

I hope that helps someone out there!

Android (robot)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Introduction To OpenSSH
  • Solving the Kubernetes Security Puzzle
  • How To Choose the Right Streaming Database
  • Testing Level Dynamics: Achieving Confidence From Testing

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: