Tutorial - Android App Development Basics - In a nutshell - 02. Android System
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
Official development environment that enables developers to create apps that run on Android devices.
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 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 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 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
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.
Sharing a photo in Gallery app will display a list of app that accepts a picture as input.
An Intent that specifies a specific activity to be launched is known as explicit Intent.
Intents can also pass data between activities by including additional data called extras within the Intent.
putExtra() method with appropriate type of object is used to package extra data along with an Intent.
Service is a task that runs independently of an activity. It can be launched from an activity and run in the background.
IntentService provides an easy and simple way to implement an Android Service.
IntentService should also be defined in the Android Manifest file
startService() method accepts Intent as a parameter which is the Intent associated with the IntentService.
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.
If you need any help, feel free to ping us in
Facebook @ https://www.facebook.com/ChillzeeCom/
Twitter @ https://twitter.com/Chill_Zee