SlideShare a Scribd company logo
Learn Xamarin Absolute Beginners
Application Manifest, Android Resources &
Android Activity Lifecycle
Eng Teong Cheah
Microsoft MVP in Visual Studio &
Development Technologies
Agenda
•Application Manifest
•Android Resources
•Android Activity Lifecycle
Application Manifest
Application Manifest
All Android Apps have a manifest file commonly referred to as
AndroidManifest.xml. The manifest file contains everything about the
Android platform that an App needs in order to run successfully.
Application Manifest
- It lists the libraries that the application must be linked.
Application Manifest
The following screenshot shows a Manifest file.
Application Manifest
Application name – It refers to the title of your App
Package name – It is a unique name used to identify your App
Application Icon – It is the icon displayed on the Android home
screen for your App.
Application Manifest
Version Number – It is a single number that is used to show one
version of your App is more recent than other.
Version Name – It is a user-friendly version string for your App that
users will see on your App settings and on the Google PlayStore. The
following code shows an example of a version name.
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" >
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionName="1.0.0">
Application Manifest
Minimum Android Version – It is the lowest Android version platform
which your application supports.
In the above example, our minimum Android version is API Level 16,
commonly referred to as JELLY BEAN.
Target Android Version – It is the Android version on which your App
is compiled against.
<uses-sdk android:minSdkVersion="16" />
Android Resources
Android Resources
When a new Android project is
created, there are some files that are
added to the project, by default. We
call these default project files and
folders as Android Resources. Take a
look at the following screenshot.
Android Resources
The default Android resources include the following -
AndroidManifest.xml file – It contains information about your Android
applications, e.g. the application name, permissions, etc.
Resources folder - Resources can be images, layouts, strings, etc.
that can be loaded via Android’s resource system.
Android Resources
Resources / drawable folder – It stores all the images that you are
going to use in your application.
Resources / layout folder -It contains all the Android XML file (.axml)
that Android uses to build user interfaces.
The Resources / value folder - It contains XML files to declare key-
value pairs for strings (and other types) throughout an application.
This is how localization for multiple languages is normally set up on
Android.
Android Resources
Resources.designer.cs – This file is created automatically when the
Android projected is created and it conatins unique identifiers that
reference the Android resources.
MainActivity.cs file - This is the first activity of your Android
application and from where the main application actions are
launched from.
Android Resources
Resource files can be accessed programmatically through a unique ID
which is stored in the resources.designer.cs file. The ID is contained
user a class call Resource. Any resource added to the project is
automatically generated inside the resource class.
Demo
Android Activity Lifecycle
Android Activity Lifecycle
When a user navigates through an Android App, a series of events
occurs. For example, when a user launches an app, e.g. the Facebook
App, it starts and becomes visible on the foreground to the user,
onCreate( ) -> onStart( ) -> onResume( ).
Android Activity Lifecycle
If another activity starts, e.g., a phone call comes in, then the
Facebook app will go to the background and the call comes to the
foreground. We now have two processes running.
onPause() --- > onStop()
Android Activity Lifecycle
When the phone call ends, the Facebook app returns to the
foreground. Three methods are called.
onRestart() --- > onStart() --- > onResume()
Android Activity Lifecycle
There are 7 lifecycle processes in an Android activity. They include –
onCreate – It is called when the activity is first created.
onStart – It is called when the activity starts and becomes visible to
the user.
onResume– It is called when the activity starts interacting with the
user. User input takes place at this stage.
Android Activity Lifecycle
onPause – It is called when the activity runs in the background but
has not yet been killed.
onStop – It is called when the activity is no longer visible to the user.
onRestart - It is called after the activity has stopped, before starting
again. It is normally called when a user goes back to a previous
activity that had been stopped.
Android Activity Lifecycle
onDestroy – This is the final call before the activity is removed from
the memory.
Android Activity Lifecycle
The following illustration shows the
Android Activity Lifecycle -
Related Content
•TutorialsPoint
www.tutorialspoint.com
Thank You

More Related Content

PPTX
PPTX
Lesson 10
PPTX
Android Programming.pptx
PPTX
"Discover windows phone" 01. Project Template
PPTX
Android development session
PPTX
Write an application that draws basic graphical primitives.pptx
PPTX
Android Layout.pptx
DOCX
Activity
Lesson 10
Android Programming.pptx
"Discover windows phone" 01. Project Template
Android development session
Write an application that draws basic graphical primitives.pptx
Android Layout.pptx
Activity

Similar to Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & Android Activity Lifecycle (20)

DOCX
Activity
DOCX
Activity
DOCX
Activity
DOCX
Android Application Components with Implementation & Examples
PDF
Android stepbystep
PDF
Android development Training Programme Day 2
PDF
Android application development
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
PPTX
Android Life Cycle
DOCX
Android building blocks and application life cycle-chapter3
PDF
Android Development
PPT
Android application development for TresmaxAsia
PDF
Introduction to Android Development
PPT
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
PPT
MD-IV-CH-ppt.ppt
DOCX
Android Tutorial For Beginners Part-1
PDF
Marakana android-java developers
PPT
Android activity, service, and broadcast recievers
PDF
Learn how to develop for Android, beyond the Hello World android app - Cape T...
PPT
Android lifecycle
Activity
Activity
Activity
Android Application Components with Implementation & Examples
Android stepbystep
Android development Training Programme Day 2
Android application development
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
Android Life Cycle
Android building blocks and application life cycle-chapter3
Android Development
Android application development for TresmaxAsia
Introduction to Android Development
Android Training Ahmedabad , Android Course Ahmedabad, Android architecture
MD-IV-CH-ppt.ppt
Android Tutorial For Beginners Part-1
Marakana android-java developers
Android activity, service, and broadcast recievers
Learn how to develop for Android, beyond the Hello World android app - Cape T...
Android lifecycle
Ad

More from Eng Teong Cheah (20)

PDF
Modern Cross-Platform Apps with .NET MAUI
PDF
Efficiently Removing Duplicates from a Sorted Array
PDF
Monitoring Models
PDF
Responsible Machine Learning
PDF
Training Optimal Models
PDF
Deploying Models
PDF
Machine Learning Workflows
PDF
Working with Compute
PDF
Working with Data
PDF
Experiments & TrainingModels
PDF
Automated Machine Learning
PDF
Getting Started with Azure Machine Learning
PDF
Hacking Containers - Container Storage
PDF
Hacking Containers - Looking at Cgroups
PDF
Hacking Containers - Linux Containers
PDF
Data Security - Storage Security
PDF
Application Security- App security
PDF
Application Security - Key Vault
PDF
Compute Security - Container Security
PDF
Compute Security - Host Security
Modern Cross-Platform Apps with .NET MAUI
Efficiently Removing Duplicates from a Sorted Array
Monitoring Models
Responsible Machine Learning
Training Optimal Models
Deploying Models
Machine Learning Workflows
Working with Compute
Working with Data
Experiments & TrainingModels
Automated Machine Learning
Getting Started with Azure Machine Learning
Hacking Containers - Container Storage
Hacking Containers - Looking at Cgroups
Hacking Containers - Linux Containers
Data Security - Storage Security
Application Security- App security
Application Security - Key Vault
Compute Security - Container Security
Compute Security - Host Security
Ad

Recently uploaded (20)

PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
Machine learning based COVID-19 study performance prediction
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Assigned Numbers - 2025 - Bluetooth® Document
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Chapter 3 Spatial Domain Image Processing.pdf
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
Network Security Unit 5.pdf for BCA BBA.
Review of recent advances in non-invasive hemoglobin estimation
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Machine learning based COVID-19 study performance prediction
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
gpt5_lecture_notes_comprehensive_20250812015547.pdf

Learn Xamarin Absolute Beginners - Application Manifest, Android Resources & Android Activity Lifecycle

  • 1. Learn Xamarin Absolute Beginners Application Manifest, Android Resources & Android Activity Lifecycle Eng Teong Cheah Microsoft MVP in Visual Studio & Development Technologies
  • 4. Application Manifest All Android Apps have a manifest file commonly referred to as AndroidManifest.xml. The manifest file contains everything about the Android platform that an App needs in order to run successfully.
  • 5. Application Manifest - It lists the libraries that the application must be linked.
  • 6. Application Manifest The following screenshot shows a Manifest file.
  • 7. Application Manifest Application name – It refers to the title of your App Package name – It is a unique name used to identify your App Application Icon – It is the icon displayed on the Android home screen for your App.
  • 8. Application Manifest Version Number – It is a single number that is used to show one version of your App is more recent than other. Version Name – It is a user-friendly version string for your App that users will see on your App settings and on the Google PlayStore. The following code shows an example of a version name. <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" > <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.0">
  • 9. Application Manifest Minimum Android Version – It is the lowest Android version platform which your application supports. In the above example, our minimum Android version is API Level 16, commonly referred to as JELLY BEAN. Target Android Version – It is the Android version on which your App is compiled against. <uses-sdk android:minSdkVersion="16" />
  • 11. Android Resources When a new Android project is created, there are some files that are added to the project, by default. We call these default project files and folders as Android Resources. Take a look at the following screenshot.
  • 12. Android Resources The default Android resources include the following - AndroidManifest.xml file – It contains information about your Android applications, e.g. the application name, permissions, etc. Resources folder - Resources can be images, layouts, strings, etc. that can be loaded via Android’s resource system.
  • 13. Android Resources Resources / drawable folder – It stores all the images that you are going to use in your application. Resources / layout folder -It contains all the Android XML file (.axml) that Android uses to build user interfaces. The Resources / value folder - It contains XML files to declare key- value pairs for strings (and other types) throughout an application. This is how localization for multiple languages is normally set up on Android.
  • 14. Android Resources Resources.designer.cs – This file is created automatically when the Android projected is created and it conatins unique identifiers that reference the Android resources. MainActivity.cs file - This is the first activity of your Android application and from where the main application actions are launched from.
  • 15. Android Resources Resource files can be accessed programmatically through a unique ID which is stored in the resources.designer.cs file. The ID is contained user a class call Resource. Any resource added to the project is automatically generated inside the resource class.
  • 16. Demo
  • 18. Android Activity Lifecycle When a user navigates through an Android App, a series of events occurs. For example, when a user launches an app, e.g. the Facebook App, it starts and becomes visible on the foreground to the user, onCreate( ) -> onStart( ) -> onResume( ).
  • 19. Android Activity Lifecycle If another activity starts, e.g., a phone call comes in, then the Facebook app will go to the background and the call comes to the foreground. We now have two processes running. onPause() --- > onStop()
  • 20. Android Activity Lifecycle When the phone call ends, the Facebook app returns to the foreground. Three methods are called. onRestart() --- > onStart() --- > onResume()
  • 21. Android Activity Lifecycle There are 7 lifecycle processes in an Android activity. They include – onCreate – It is called when the activity is first created. onStart – It is called when the activity starts and becomes visible to the user. onResume– It is called when the activity starts interacting with the user. User input takes place at this stage.
  • 22. Android Activity Lifecycle onPause – It is called when the activity runs in the background but has not yet been killed. onStop – It is called when the activity is no longer visible to the user. onRestart - It is called after the activity has stopped, before starting again. It is normally called when a user goes back to a previous activity that had been stopped.
  • 23. Android Activity Lifecycle onDestroy – This is the final call before the activity is removed from the memory.
  • 24. Android Activity Lifecycle The following illustration shows the Android Activity Lifecycle -