SlideShare a Scribd company logo
1 of 13
Mobile Application Development
Focus on Andriod Application development and
compare it with IOS.
Basic Topics covered Session 1
Fragments : slide 3
Activity Lifecycle : slide 4
Configuration Changes : slide 5
Starting activity and getting results: slide 6,7
Saving persistent State: Slide 7
Permissions: Slide 8
Process Lifecycle: Slide 9.
Fragments
• With Version Honeycomb Fragement class is optional for
Activity Class for modularization.
• Scale application between small and large screen.
• public class ArticleFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater inflater,
ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.article_view, container,
false);
}
}
Activity Class
• Activity- Any single focused thing User Does.
• Create window using setContentView(View).
• Full screen or Floating Window using theme
WindowIsFloating().
• Can be Grouped using class ActivityGroup
• Initialized using onCreate(Bundle) which call
setContentView() with layout resource defined to
create UI.
• findViewById(int) :retireve widget in that UI.
• onPause() deal with user leaving your activity &
changes commits ContentProvider holding data.
Visible
Lifetime
Foreground
Lifetime
Entire
Lifetime
Configuration Changes
• Resource.configuration Class allow UI
undisturbed in case of changes in
Configuration.
• Even foreground activity visible to user killed
once onDestroy() called and new activity
created To allow Configuration driven resource
handling of files etc.
• Special case usin bypass using
andriod:configChanges
Starting Activity & getting result
• startActivity(Intent): used to start Activity.
Placed in activity stack and intent describe
activity to be executed.
• Activity Exits must return RESULT_CANCELED,
RESULT_OK or any custom value.
•
Saving Persistent State
• Actvity deals with two major States:
• Shared document like data( on SQLite
database using contentprovider)
• Internal State: like user preferences.
• While creating a new document a database
entry is created.
• When onPause() called the state content
provider files of user is saved
Process Lifecycle
• Application can have four states based on Activity
Lifecycle. (As shown in diagram in slide2)
If memory Not Available then All kinds of processes can be forced closed.
• Foreground Activity: User interacts with user and
process has least priority to be killed.
• Visible Activity: Visible not in foreground killed only
when conflict with foreground.
• Background Activity: not visible or paused not critical
can be safely killed restarted with onCreate() with
savedInstanceState.(start from where left)
• Empty process: hosting no activity killed highest
priority
Intent
• Abstract description of operation to be performed.
startActivity: launch Activity
BroadCastIntent(): send to Receiver
startService(Intent):
bindService(Intent, ServiceConnection,int): Bind to service
• Structure:
– Action: To be performed
– Data: data to be operate on.
– Category: addition info for execution like launch as top level or
as alternative application
– Type: Explicit typing of data intent (Normally MIME type).
– Component: Component class for intent
otherwise(Action,Data/Type, Category) is matched.
– Extras: Bundle Additional data Like subject, Body with email.
Example Operations spec as Intent
• Launch Home screen:
ACTION_MAIN & CATEGORY_HOME
• Display people phone Number, browse & pick:
ACTION_GET_CONTENT & MIME TYPE
(vnd.andriod.cursor.item/phone.
• ACTION_GET_CONTENT with mime type Any
(*/*) and Category CATEGORY_OPENABLE.
ContentResolver.opemInputStream() pick &
attach data return URI to caller.
Mime Type list :
http://www.freeformatter.com/mime-types-
list.html
More Details: Cont. Next 4 more slides
• Visit http://sandyclassic.wordpress.com
• Java Architect :
http://javaarchitectview.wordpress.com/
Enterprise Architect:
http://enterprisearchitectview.wordpress.com
• Cloud perspective :
http://thecloudview.wordpress.com/
• Product Management:
http://productmanagementview.wordpress.co
m

More Related Content

Viewers also liked

iPhone and iPad Application Development
iPhone and iPad Application DevelopmentiPhone and iPad Application Development
iPhone and iPad Application DevelopmentInfoShell
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application DevelopmentInfoShell
 
Android Application Development Advanced
Android Application Development AdvancedAndroid Application Development Advanced
Android Application Development AdvancedOESF Education
 
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIA
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIAThesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIA
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIASeun Otukoya
 

Viewers also liked (6)

Andriod vs iOS
Andriod vs iOSAndriod vs iOS
Andriod vs iOS
 
iPhone and iPad Application Development
iPhone and iPad Application DevelopmentiPhone and iPad Application Development
iPhone and iPad Application Development
 
Android Application Development
Android Application DevelopmentAndroid Application Development
Android Application Development
 
Android Application Development Advanced
Android Application Development AdvancedAndroid Application Development Advanced
Android Application Development Advanced
 
IT in banking
IT in bankingIT in banking
IT in banking
 
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIA
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIAThesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIA
Thesis: THE ROLE OF INFORMATION TECHNOLOGY ON COMMERCIAL BANKS IN NIGERIA
 

Similar to Mobile application development: part 1: Andriod Vs IOS

11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptxMugiiiReee
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android applicationNikunj Dhameliya
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycleSokngim Sa
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & viewsma-polimi
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart JfokusLars Vogel
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptbharatt7
 
Lecture #4 activities & fragments
Lecture #4  activities & fragmentsLecture #4  activities & fragments
Lecture #4 activities & fragmentsVitali Pekelis
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdfssusere71a07
 
Databases in Android Application
Databases in Android ApplicationDatabases in Android Application
Databases in Android ApplicationMark Lester Navarro
 

Similar to Mobile application development: part 1: Andriod Vs IOS (20)

11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
fragments-activity.pptx
fragments-activity.pptxfragments-activity.pptx
fragments-activity.pptx
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android application
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycle
 
Android
AndroidAndroid
Android
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Android activity
Android activityAndroid activity
Android activity
 
Android activity
Android activityAndroid activity
Android activity
 
Android Jumpstart Jfokus
Android Jumpstart JfokusAndroid Jumpstart Jfokus
Android Jumpstart Jfokus
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.ppt
 
Fragment
Fragment Fragment
Fragment
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Lecture #4 activities & fragments
Lecture #4  activities & fragmentsLecture #4  activities & fragments
Lecture #4 activities & fragments
 
Activities.pptx
Activities.pptxActivities.pptx
Activities.pptx
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
 
Databases in Android Application
Databases in Android ApplicationDatabases in Android Application
Databases in Android Application
 

More from Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW

More from Sandeep Sharma IIMK Smart City,IoT,Bigdata,Cloud,BI,DW (20)

Management Consultancy Saudi Telecom Digital Transformation Design Thinking
Management Consultancy Saudi Telecom Digital Transformation Design ThinkingManagement Consultancy Saudi Telecom Digital Transformation Design Thinking
Management Consultancy Saudi Telecom Digital Transformation Design Thinking
 
Major new initiatives
Major new initiativesMajor new initiatives
Major new initiatives
 
Digital transformation journey Consulting
Digital transformation journey ConsultingDigital transformation journey Consulting
Digital transformation journey Consulting
 
Agile Jira Reporting
Agile Jira Reporting Agile Jira Reporting
Agile Jira Reporting
 
Lnt and bbby Retail Houseare industry Case assignment sandeep sharma
Lnt and bbby Retail Houseare industry Case assignment  sandeep sharmaLnt and bbby Retail Houseare industry Case assignment  sandeep sharma
Lnt and bbby Retail Houseare industry Case assignment sandeep sharma
 
Risk management Consulting For Municipality
Risk management Consulting For MunicipalityRisk management Consulting For Municipality
Risk management Consulting For Municipality
 
GDPR And Privacy By design Consultancy
GDPR And Privacy By design ConsultancyGDPR And Privacy By design Consultancy
GDPR And Privacy By design Consultancy
 
Real implementation Blockchain Best Use Cases Examples
Real implementation Blockchain Best Use Cases ExamplesReal implementation Blockchain Best Use Cases Examples
Real implementation Blockchain Best Use Cases Examples
 
Ffd 05 2012
Ffd 05 2012Ffd 05 2012
Ffd 05 2012
 
Biztalk architecture for Configured SMS service
Biztalk architecture for Configured SMS serviceBiztalk architecture for Configured SMS service
Biztalk architecture for Configured SMS service
 
Data modelling interview question
Data modelling interview questionData modelling interview question
Data modelling interview question
 
Pmo best practices
Pmo best practicesPmo best practices
Pmo best practices
 
Agile project management
Agile project managementAgile project management
Agile project management
 
Enroll hostel Business Model
Enroll hostel Business ModelEnroll hostel Business Model
Enroll hostel Business Model
 
Cloud manager client provisioning guideline draft 1.0
Cloud manager client provisioning guideline draft 1.0Cloud manager client provisioning guideline draft 1.0
Cloud manager client provisioning guideline draft 1.0
 
Bpm digital transformation
Bpm digital transformationBpm digital transformation
Bpm digital transformation
 
Digital transformation explained
Digital transformation explainedDigital transformation explained
Digital transformation explained
 
Government Digital transformation trend draft 1.0
Government Digital transformation trend draft 1.0Government Digital transformation trend draft 1.0
Government Digital transformation trend draft 1.0
 
Enterprise architecture maturity rating draft 1.0
Enterprise architecture maturity rating draft 1.0Enterprise architecture maturity rating draft 1.0
Enterprise architecture maturity rating draft 1.0
 
Organisation Structure For digital Transformation Team
Organisation Structure For digital Transformation TeamOrganisation Structure For digital Transformation Team
Organisation Structure For digital Transformation Team
 

Recently uploaded

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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 educationjfdjdjcjdnsjd
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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 WorkerThousandEyes
 
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, Adobeapidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 

Recently uploaded (20)

Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Mobile application development: part 1: Andriod Vs IOS

  • 1. Mobile Application Development Focus on Andriod Application development and compare it with IOS.
  • 2. Basic Topics covered Session 1 Fragments : slide 3 Activity Lifecycle : slide 4 Configuration Changes : slide 5 Starting activity and getting results: slide 6,7 Saving persistent State: Slide 7 Permissions: Slide 8 Process Lifecycle: Slide 9.
  • 3. Fragments • With Version Honeycomb Fragement class is optional for Activity Class for modularization. • Scale application between small and large screen. • public class ArticleFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.article_view, container, false); } }
  • 4. Activity Class • Activity- Any single focused thing User Does. • Create window using setContentView(View). • Full screen or Floating Window using theme WindowIsFloating(). • Can be Grouped using class ActivityGroup • Initialized using onCreate(Bundle) which call setContentView() with layout resource defined to create UI. • findViewById(int) :retireve widget in that UI. • onPause() deal with user leaving your activity & changes commits ContentProvider holding data.
  • 6. Configuration Changes • Resource.configuration Class allow UI undisturbed in case of changes in Configuration. • Even foreground activity visible to user killed once onDestroy() called and new activity created To allow Configuration driven resource handling of files etc. • Special case usin bypass using andriod:configChanges
  • 7. Starting Activity & getting result • startActivity(Intent): used to start Activity. Placed in activity stack and intent describe activity to be executed. • Activity Exits must return RESULT_CANCELED, RESULT_OK or any custom value. •
  • 8. Saving Persistent State • Actvity deals with two major States: • Shared document like data( on SQLite database using contentprovider) • Internal State: like user preferences. • While creating a new document a database entry is created. • When onPause() called the state content provider files of user is saved
  • 9. Process Lifecycle • Application can have four states based on Activity Lifecycle. (As shown in diagram in slide2) If memory Not Available then All kinds of processes can be forced closed. • Foreground Activity: User interacts with user and process has least priority to be killed. • Visible Activity: Visible not in foreground killed only when conflict with foreground. • Background Activity: not visible or paused not critical can be safely killed restarted with onCreate() with savedInstanceState.(start from where left) • Empty process: hosting no activity killed highest priority
  • 10. Intent • Abstract description of operation to be performed. startActivity: launch Activity BroadCastIntent(): send to Receiver startService(Intent): bindService(Intent, ServiceConnection,int): Bind to service • Structure: – Action: To be performed – Data: data to be operate on. – Category: addition info for execution like launch as top level or as alternative application – Type: Explicit typing of data intent (Normally MIME type). – Component: Component class for intent otherwise(Action,Data/Type, Category) is matched. – Extras: Bundle Additional data Like subject, Body with email.
  • 11. Example Operations spec as Intent • Launch Home screen: ACTION_MAIN & CATEGORY_HOME • Display people phone Number, browse & pick: ACTION_GET_CONTENT & MIME TYPE (vnd.andriod.cursor.item/phone. • ACTION_GET_CONTENT with mime type Any (*/*) and Category CATEGORY_OPENABLE. ContentResolver.opemInputStream() pick & attach data return URI to caller. Mime Type list : http://www.freeformatter.com/mime-types- list.html
  • 12.
  • 13. More Details: Cont. Next 4 more slides • Visit http://sandyclassic.wordpress.com • Java Architect : http://javaarchitectview.wordpress.com/ Enterprise Architect: http://enterprisearchitectview.wordpress.com • Cloud perspective : http://thecloudview.wordpress.com/ • Product Management: http://productmanagementview.wordpress.co m

Editor's Notes

  1. All Mime types: http://www.webmaster-toolkit.com/mime-types.shtml http://www.freeformatter.com/mime-types-list.html
  2. All Mime types: http://www.webmaster-toolkit.com/mime-types.shtml http://www.freeformatter.com/mime-types-list.html