SlideShare a Scribd company logo
1 of 39
ANDROID
Application Development Fundamentals
1
A Programme Under the Compumitra Series
Copyright 2012-15 © Sunmitra Education Technologies Limited, India
2
Outline
• Basics of Applications
• Principle of Least Privilege
• Data Sharing
• Application Component
• Manifest File
• Resources
• Metrics
Basics of Android
Applications
3
Basic Fundas
• Programs are mainly written in Java. Can
be written in other languages, but need to
create DVM compatible code.
• Entire Application Code, Data and
Resources are compiled and created into
one package that comes with an .apk
suffix.
• The .apk file is the file that is used to
install applications onto the target system.
Application Working Concept
5
Linux
VM1
VM2
VM3
VM4
App-1
App-2
App-3
App-4
App-4
UserID - A
UserID - B
UserID - C
UserID - D
We can arrange for
two apps to share
same VM and same
User ID to share data
Most apps will run in their own
VM and a self generated
UserID (unknown to app)
Apps can make specific requests
to get permission to access
device data like contacts, SMS,
SD card, Camera, Bluetooth.
This permission is specifically
granted at installation time.
Application Working
• Each process is started only
when required and shut-off when
not in need, to recover memory
for other application.
• Each applications runs in its own
Sandbox.
Principle of Least Privilege
Power Needs Security
• Each process can use only the
components needed.
• It can not crossover to other memory area
and read/write anything where other
application is doing something.
• This makes it highly secure and free of
memory leaks.
Data Sharing Between Applications
Secure Things also need Sharing
• When sharing between applications is
required they share the same Linux user
id.
• Same user Id processes can also arrange
to run in same process and share same
virtual machine.
• Application requests permission to access,
contacts, SD card, SMS etc.
• Permissions are granted by the end user
the time of application installation.
Application Components
4 Basic Types
• Activities
• Services
• Content Providers
• Broadcast Receivers
Activities
• A single screen with a user interface.
• Activity can be divided into multiple screen areas
called fragments.
• For an Email application
– View Email List Activity
– Compose Email Activity
– View Settings Activity
• Each activity is independent and can be started
by other applications/activities.
• Activities are implemented as a subclass of
Activity.
Activity Life Cycle
14
Activitiy-Fragments
• Conceptually fragments allow to define screen area that could be
used as a reusable components by multiple activities.
• A fragment is a sub-activity which has its own lifecycle of creation,
use and destruction, but is paused or destroyed along with its parent
activity.
Fragment Lifecycle
16
Services
• Some thing that runs in background and
doesn't have a user interface.
• Ex. Playing music in background.
• Ex. Watching whether a new email is
coming.
• It is implemented as a subclass of Service.
• Services are also independent and can be
started by different applications.
Content Provider
• It manages a shared set of data.
• In a file system, SQLite, SDCard,
• Through this data query, data update is
possible.
• Permissions need to be set to use any
content.
• Implemented as subclass of
ContentProvider.
Broadcast Receiver
• Responds to system wide announcements
• For e.g.
– Battery low
– Screen turned off
– Picture captured
• Application can also initiate broadcast
– Some data has been downloaded.
• Implemented as subclass of
BroadcastReciever.
Components Activation
• Components like Activities, services,
broadcast are activated by using Intents.
• Intents are asynchronous in nature.
• The purpose of Intents is to bind
application components together at
runtime.
• They act as messengers between them.
• Created with an Intent object.
• The component ContentProvider is
activated by a request from
Activation Examples.
• startActivity( ), startActivityForResult( )
• startService( ), bindService( )
• sendBroadcast( )
• query( )
Manifest
Manifest Purpose
• It is to tell the system about existence of
various components.
• To tell about user permissions.
• Declaration of API version requirement
• Hardware/Software features required by
the application.
• Libraries the application needs to link.
• Saved as AndroidManifest.xml
Sample
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:icon="@drawable/app_icon.png"
... >
<activity
android:name="com.example.project.ExampleActivity"
android:label="@string/example_label" ... >
</activity>
...
</application>
</manifest>
Manifest Nodes - 1
• uses-permission
requests a permission from user, that must be
granted to operate it correctly.
• permission
permission to use a local resource or activity, as
well as to allow
• permission-tree
declares a base name for a tree of permissions.
•
Manifest Nodes - 2
• permission-group
allows to group logically related permissions.
• instrumentation
required to handle instrument class
• uses-sdk
allows to set minimum, maximum and target SDK
version required to run the app.
Manifest Nodes - 3
• uses-configuration
allows to set configuration of uses like allowing
keyboard, keyboard type, touch screen uses etc.
• uses-features
allow to set feature uses like for camera,
bluetooth etc.
• supports-screens
allows to set things related to screen sizes and
densities.
Manifest Nodes - 4
• compatible-screens
allows to set compatibility of application with
different screens.
• supports-gl-texture
allow to set the type of texture compression used
for storing images.
Manifest Nodes - 5
• application
this special node related to application
configuration, further supports sub-nodes such
as:
– activity
– activity-alias
– service
– receiver
– provider
– uses-library
Resources
Items separate from Source codes
• Defined Strings and other variables.
• Images, Icons etc.
• Layout of activities.
• Audio/Video files.
• Menus, Styles, Colours etc.
Understanding Resources - 1
• Resources are carried as integral part of
android apps (apk files).
• Resources are static content which are
fixed for typical apk file.
• One can however dynamically select the
which resource portion to use for a given
action..
32
Understanding Resources - 2
• The purpose of having external resources
at development time is the maintainability
of application code.
• Resources are usually kept in /res/ folder
of the typical android project.
• Resource can contain the media files or
XML based configuration files
33
Understanding Resources – 3
• Typically available Resources are
– Animations resources (in res/anim or res/drawables)
– Color State Lists (in res/color), used for control states
likes, pressed, focused etc.
– Image resources (in res/drawables)
– Layouts (in res/layout)
– Menu (in res/menu)
– Values (in res/values/strings.xml,
res/values/dimens.xml, res/values/styles.xml,
res/values/colors.xml)
– Raw Audio/Video files (in res/raw folder)
34
Understanding Resources – 4
• Preferred Bitmap Graphics used for Android is png
format. Jpg is acceptable. Gif is supported but
discouraged.
• Many drawable folders for bitmap graphics are made
available on the basis of android screen pixel density.
– ldpi (Low density – 120dpi)
– mdpi (Medium density – 160 dpi)
– hdpi (High Density – 240 dpi)
– xhdpi (extra high density – 320 dpi)
– xxhdpi (double extra high density – 480 dpi)
– xxxhdpi (triple extra high density – 640 dpi)
35
Metrics
Units used in android apps
• dp or dip – Device independent pixels. Use it for
element sizes (text box, button etc.) and gaps.
Same size feel on different screens. 1px = 1 dp
on mdpi (px = dp * (dpi/160) )
• sp or sip – Scale Independent pixels.
Use it for fonts. Usually equal to dp, but it reacts
to font size configurations.
• ems – Size of width of m of given fonts. Allows
to set relative unit for elements with respect to
font sizes.
37
38
Bibliography
• http://en.wikipedia.org
• http://developer.android.co
m
• http://play.google.com
• http://source.android.com
• http://www.youtube.com
39
Thanks.
Discussion Follows…
• Keep visiting www.sunmitra.com for
programme updates.
• Please keep interacting using the
email sunmitraeducation@gmail.com
.
• Please subscribe us when you get a
facebook invitation from sunmitra.

More Related Content

Viewers also liked

Viewers also liked (9)

Android Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and VersionsAndroid Fundamentals, Architecture and Versions
Android Fundamentals, Architecture and Versions
 
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
Accelerating or Complicating PHP execution by LLVM Compiler Infrastructure
 
Build Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVMBuild Programming Language Runtime with LLVM
Build Programming Language Runtime with LLVM
 
3分でわかるAzureでのService Principal
3分でわかるAzureでのService Principal3分でわかるAzureでのService Principal
3分でわかるAzureでのService Principal
 
しみじみサーバーレス
しみじみサーバーレスしみじみサーバーレス
しみじみサーバーレス
 
20分でおさらいするサーバレスアーキテクチャ 「サーバレスの薄い本ダイジェスト」 #serverlesstokyo
20分でおさらいするサーバレスアーキテクチャ 「サーバレスの薄い本ダイジェスト」 #serverlesstokyo20分でおさらいするサーバレスアーキテクチャ 「サーバレスの薄い本ダイジェスト」 #serverlesstokyo
20分でおさらいするサーバレスアーキテクチャ 「サーバレスの薄い本ダイジェスト」 #serverlesstokyo
 
Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience Develop Community-based Android Distribution and Upstreaming Experience
Develop Community-based Android Distribution and Upstreaming Experience
 
Android タブレットにLinuxを入れて色々と遊んでみよう 続編その2 Hacking of Android Tablet on Linux
Android タブレットにLinuxを入れて色々と遊んでみよう 続編その2 Hacking of Android Tablet on LinuxAndroid タブレットにLinuxを入れて色々と遊んでみよう 続編その2 Hacking of Android Tablet on Linux
Android タブレットにLinuxを入れて色々と遊んでみよう 続編その2 Hacking of Android Tablet on Linux
 
3分でわかる Azure Managed Diskのしくみ
3分でわかる Azure Managed Diskのしくみ3分でわかる Azure Managed Diskのしくみ
3分でわかる Azure Managed Diskのしくみ
 

Similar to Android application development fundamentals

Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
Boom Shukla
 
Android General information
Android General informationAndroid General information
Android General information
Prashant Gosai
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Joe Jacob
 

Similar to Android application development fundamentals (20)

Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Introduction to Android Development and Security
Introduction to Android Development and SecurityIntroduction to Android Development and Security
Introduction to Android Development and Security
 
128-ch4.pptx
128-ch4.pptx128-ch4.pptx
128-ch4.pptx
 
CNIT 128 Ch 4: Android
CNIT 128 Ch 4: AndroidCNIT 128 Ch 4: Android
CNIT 128 Ch 4: Android
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Hacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OSHacker Halted 2014 - Reverse Engineering the Android OS
Hacker Halted 2014 - Reverse Engineering the Android OS
 
Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
Android General information
Android General informationAndroid General information
Android General information
 
Introduction to android basics
Introduction to android basicsIntroduction to android basics
Introduction to android basics
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1Hacking and Securing iOS Apps : Part 1
Hacking and Securing iOS Apps : Part 1
 
Multimedia authoring and user interface
Multimedia authoring and user interface Multimedia authoring and user interface
Multimedia authoring and user interface
 
Basics 4
Basics   4Basics   4
Basics 4
 
android development training in mumbai
android development training in mumbaiandroid development training in mumbai
android development training in mumbai
 
Android Studio development model and.pptx
Android Studio development model and.pptxAndroid Studio development model and.pptx
Android Studio development model and.pptx
 
Android
Android Android
Android
 
Fun Food
Fun FoodFun Food
Fun Food
 

More from indiangarg

More from indiangarg (17)

Anger.pdf
Anger.pdfAnger.pdf
Anger.pdf
 
Vikars (विकार) explained in Vedic and Modern Context
Vikars (विकार) explained in Vedic and Modern ContextVikars (विकार) explained in Vedic and Modern Context
Vikars (विकार) explained in Vedic and Modern Context
 
Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)
Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)
Some Commonly asked Function/Objects Vs. header files (CBSE 12th Exam)
 
Preparing an Effective CV
Preparing an Effective CVPreparing an Effective CV
Preparing an Effective CV
 
Motivation
MotivationMotivation
Motivation
 
Attitude Towards Life
Attitude Towards LifeAttitude Towards Life
Attitude Towards Life
 
Goal setting
Goal settingGoal setting
Goal setting
 
Self confidence
Self confidenceSelf confidence
Self confidence
 
Android the sweetmobility
Android the sweetmobilityAndroid the sweetmobility
Android the sweetmobility
 
Time management
Time managementTime management
Time management
 
Handling action bar in Android
Handling action bar in AndroidHandling action bar in Android
Handling action bar in Android
 
Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)Programming Fundamentals With OOPs Concepts (Java Examples Based)
Programming Fundamentals With OOPs Concepts (Java Examples Based)
 
Basics of XML
Basics of XMLBasics of XML
Basics of XML
 
Digital Image File Formats
Digital Image File FormatsDigital Image File Formats
Digital Image File Formats
 
Understanding Colors
Understanding ColorsUnderstanding Colors
Understanding Colors
 
07 cof-tea
07 cof-tea07 cof-tea
07 cof-tea
 
Mixing Cultures
Mixing CulturesMixing Cultures
Mixing Cultures
 

Recently uploaded

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 

Android application development fundamentals

  • 1. ANDROID Application Development Fundamentals 1 A Programme Under the Compumitra Series Copyright 2012-15 © Sunmitra Education Technologies Limited, India
  • 2. 2 Outline • Basics of Applications • Principle of Least Privilege • Data Sharing • Application Component • Manifest File • Resources • Metrics
  • 4. Basic Fundas • Programs are mainly written in Java. Can be written in other languages, but need to create DVM compatible code. • Entire Application Code, Data and Resources are compiled and created into one package that comes with an .apk suffix. • The .apk file is the file that is used to install applications onto the target system.
  • 5. Application Working Concept 5 Linux VM1 VM2 VM3 VM4 App-1 App-2 App-3 App-4 App-4 UserID - A UserID - B UserID - C UserID - D We can arrange for two apps to share same VM and same User ID to share data Most apps will run in their own VM and a self generated UserID (unknown to app) Apps can make specific requests to get permission to access device data like contacts, SMS, SD card, Camera, Bluetooth. This permission is specifically granted at installation time.
  • 6. Application Working • Each process is started only when required and shut-off when not in need, to recover memory for other application. • Each applications runs in its own Sandbox.
  • 7. Principle of Least Privilege
  • 8. Power Needs Security • Each process can use only the components needed. • It can not crossover to other memory area and read/write anything where other application is doing something. • This makes it highly secure and free of memory leaks.
  • 9. Data Sharing Between Applications
  • 10. Secure Things also need Sharing • When sharing between applications is required they share the same Linux user id. • Same user Id processes can also arrange to run in same process and share same virtual machine. • Application requests permission to access, contacts, SD card, SMS etc. • Permissions are granted by the end user the time of application installation.
  • 12. 4 Basic Types • Activities • Services • Content Providers • Broadcast Receivers
  • 13. Activities • A single screen with a user interface. • Activity can be divided into multiple screen areas called fragments. • For an Email application – View Email List Activity – Compose Email Activity – View Settings Activity • Each activity is independent and can be started by other applications/activities. • Activities are implemented as a subclass of Activity.
  • 15. Activitiy-Fragments • Conceptually fragments allow to define screen area that could be used as a reusable components by multiple activities. • A fragment is a sub-activity which has its own lifecycle of creation, use and destruction, but is paused or destroyed along with its parent activity.
  • 17. Services • Some thing that runs in background and doesn't have a user interface. • Ex. Playing music in background. • Ex. Watching whether a new email is coming. • It is implemented as a subclass of Service. • Services are also independent and can be started by different applications.
  • 18. Content Provider • It manages a shared set of data. • In a file system, SQLite, SDCard, • Through this data query, data update is possible. • Permissions need to be set to use any content. • Implemented as subclass of ContentProvider.
  • 19. Broadcast Receiver • Responds to system wide announcements • For e.g. – Battery low – Screen turned off – Picture captured • Application can also initiate broadcast – Some data has been downloaded. • Implemented as subclass of BroadcastReciever.
  • 20. Components Activation • Components like Activities, services, broadcast are activated by using Intents. • Intents are asynchronous in nature. • The purpose of Intents is to bind application components together at runtime. • They act as messengers between them. • Created with an Intent object. • The component ContentProvider is activated by a request from
  • 21. Activation Examples. • startActivity( ), startActivityForResult( ) • startService( ), bindService( ) • sendBroadcast( ) • query( )
  • 23. Manifest Purpose • It is to tell the system about existence of various components. • To tell about user permissions. • Declaration of API version requirement • Hardware/Software features required by the application. • Libraries the application needs to link. • Saved as AndroidManifest.xml
  • 24. Sample <?xml version="1.0" encoding="utf-8"?> <manifest ... > <application android:icon="@drawable/app_icon.png" ... > <activity android:name="com.example.project.ExampleActivity" android:label="@string/example_label" ... > </activity> ... </application> </manifest>
  • 25. Manifest Nodes - 1 • uses-permission requests a permission from user, that must be granted to operate it correctly. • permission permission to use a local resource or activity, as well as to allow • permission-tree declares a base name for a tree of permissions. •
  • 26. Manifest Nodes - 2 • permission-group allows to group logically related permissions. • instrumentation required to handle instrument class • uses-sdk allows to set minimum, maximum and target SDK version required to run the app.
  • 27. Manifest Nodes - 3 • uses-configuration allows to set configuration of uses like allowing keyboard, keyboard type, touch screen uses etc. • uses-features allow to set feature uses like for camera, bluetooth etc. • supports-screens allows to set things related to screen sizes and densities.
  • 28. Manifest Nodes - 4 • compatible-screens allows to set compatibility of application with different screens. • supports-gl-texture allow to set the type of texture compression used for storing images.
  • 29. Manifest Nodes - 5 • application this special node related to application configuration, further supports sub-nodes such as: – activity – activity-alias – service – receiver – provider – uses-library
  • 31. Items separate from Source codes • Defined Strings and other variables. • Images, Icons etc. • Layout of activities. • Audio/Video files. • Menus, Styles, Colours etc.
  • 32. Understanding Resources - 1 • Resources are carried as integral part of android apps (apk files). • Resources are static content which are fixed for typical apk file. • One can however dynamically select the which resource portion to use for a given action.. 32
  • 33. Understanding Resources - 2 • The purpose of having external resources at development time is the maintainability of application code. • Resources are usually kept in /res/ folder of the typical android project. • Resource can contain the media files or XML based configuration files 33
  • 34. Understanding Resources – 3 • Typically available Resources are – Animations resources (in res/anim or res/drawables) – Color State Lists (in res/color), used for control states likes, pressed, focused etc. – Image resources (in res/drawables) – Layouts (in res/layout) – Menu (in res/menu) – Values (in res/values/strings.xml, res/values/dimens.xml, res/values/styles.xml, res/values/colors.xml) – Raw Audio/Video files (in res/raw folder) 34
  • 35. Understanding Resources – 4 • Preferred Bitmap Graphics used for Android is png format. Jpg is acceptable. Gif is supported but discouraged. • Many drawable folders for bitmap graphics are made available on the basis of android screen pixel density. – ldpi (Low density – 120dpi) – mdpi (Medium density – 160 dpi) – hdpi (High Density – 240 dpi) – xhdpi (extra high density – 320 dpi) – xxhdpi (double extra high density – 480 dpi) – xxxhdpi (triple extra high density – 640 dpi) 35
  • 37. Units used in android apps • dp or dip – Device independent pixels. Use it for element sizes (text box, button etc.) and gaps. Same size feel on different screens. 1px = 1 dp on mdpi (px = dp * (dpi/160) ) • sp or sip – Scale Independent pixels. Use it for fonts. Usually equal to dp, but it reacts to font size configurations. • ems – Size of width of m of given fonts. Allows to set relative unit for elements with respect to font sizes. 37
  • 38. 38 Bibliography • http://en.wikipedia.org • http://developer.android.co m • http://play.google.com • http://source.android.com • http://www.youtube.com
  • 39. 39 Thanks. Discussion Follows… • Keep visiting www.sunmitra.com for programme updates. • Please keep interacting using the email sunmitraeducation@gmail.com . • Please subscribe us when you get a facebook invitation from sunmitra.