(Reading time: 2 - 3 minutes)

Tutorial - Android App Development Basics - In a nutshell - 02. Android System

Android App Development Basics - In a nutshell

Android

Android is an operating system (OS) that runs on phones, tablets and other devices like TVs.

 

Latest Android version [as of 15th Feb 2017]

The latest version is Android 7 Nougat

 

Android studio

Official development environment that enables developers to create apps that run on Android devices.

 

Activity (android.app.Activity)

Activity is a core component of the Android platform.

An Activity is usually associated with a screen (UI) in the application.

 

Android Manifest file

Android Manifest file (AndroidManifest.xml) is the configuration file for an Android app.

Typically it includes name of the app, icon for the app, set of permissions required by the app etc.

Each and every activity in the app must be specified in the Manifest file

 

Launch Activity

Launch activity is the entry point to the app.

When an app launches, it initiates the launch activity specified in the Android Manifest file.

Most of the times, the launch activity starts other activities.

 

Intent (android.content.Intent)

Intent is used to make a request to the Android OS. It contains all the information needed by the OS to start a task.

 

startActivity() method

startActivity() method is used to start one activity from another.

Usually an Intent is passed as a parameter in the startActivity() method.

When startActivity() is called with the intent parameter, Android matches the Intent action with appropriate activity on the system and then launches that activity

 

Implicit Intent

An Intent that is less specific and requests that any activity that matches certain criteria be launched is known as implicit Intent.

In case of implicit Intent, Android presents a list of applications that can handle that task.

Example:

Sharing a photo in Gallery app will display a list of app that accepts a picture as input.

Android Gallery sharing 

 

Explicit Intent

An Intent that specifies a specific activity to be launched is known as explicit Intent.

 

Extras

Intents can also pass data between activities by including additional data called extras within the Intent.

 

putExtra() method

putExtra() method with appropriate type of object is used to package extra data along with an Intent.

 

Service (android.app.Service)

Service is a task that runs independently of an activity. It can be launched from an activity and run in the background.

 

IntentService (android.app.IntentService)

IntentService provides an easy and simple way to implement an Android Service.

IntentService should also be defined in the Android Manifest file

 

startService() method

startService() method accepts Intent as a parameter which is the Intent associated with the IntentService.

 

sendBroadcast() method

When an IntentServicecompletes, it sends a broadcast using sendBroadcast() method with Intent as a parameter.

 

BroadcastReceivers ( android.content.BroadcasrReceiver)

Broadcast Receivers listen for Intents from sendBroadcast() method and act on the Intents.

Usually a Broadcast Receiver is associated with a specific IntentService.

Tutorial - Android App Development Basics - In a nutshell - 01. Introduction


If you need any help, feel free to ping us in

Facebook @ https://www.facebook.com/ChillzeeCom/

Twitter @ https://twitter.com/Chill_Zee

Directly contact the author @ This email address is being protected from spambots. You need JavaScript enabled to view it.

Chillzee Tag Cloud

Let's Socialize

About Chillzee

Chillzee.com is an entrepreneurship portal.

The site provides informative topics on Organizational and Strategic needs.