SlideShare a Scribd company logo
Android Application Development Being Active Through Activities & Intents Ahsanul Karim [email_address] Sentinel Solutions Ltd. http://www.sentinelbd.com
Today We’re Covering… Application Structure Android Application Anatomy Activity Layout Using Layouts from Activity Activity to Activity Transition Activity Lifecycle Exercise
Android Activities Activity Activity provides a user generally with  an interactive screen  to do something like: Dialing the phone, View a map List of something for user to select or Anything you want your user to do An application usually consists of  multiple activities. Typically, one activity in an application is specified as the &quot; main &quot; activity, which is presented to the user when launching the application for the first time. (which is specified in  AndroidMenifest.xml )  The   <action>  element specifies that this is the &quot;main&quot; entry point to the application.  The  <category>  element specifies that this activity should be listed in the system's application  launcher (to allow users to launch this activity).
Android Activities (Contd..) Creating Activity We have already created Activities.  But how did we create it? Let’s revisit…  We created subclass of  Activity  base class We implemented one callback method  onCreate What is creating subclass??? What is callback methods??? Open Questions:
Android Activities (Contd..) Next Step: Implementing User Interface Design  res/layout/yourlayout.xml Use Views from Activity class Next Step: Implementing User Interface <manifest ... >   <application ... >       <activity android:name=&quot;.ExampleActivity&quot; />       ...   </application ... >   ... </manifest > Next Step: Starting Activity Intent intent = new Intent(this, ToActivity.class); startActivity(intent); We can start another activity by calling  startActivity() , passing it an  Intent  that describes the  activity you want to start.
Android Activities Exercise We’ll make 2 Activities Registration with basic features and validation: Email address First Name, Last Name Date of Birth Password Confirm Password I agree to terms and conditions Buttons: Cancel, Submit Login Email address Password Buttons: New User, Login (To be added: Remember me) Link:  http://developer.android.com/guide/appendix/faq/commontasks.html
Android Activities Exercise (Contd.) How to add new Activities to the application How to navigate from one Activity to another How to navigate from one Activity to another Intent Intent intent_1_to_2 = new Intent(this, Activity2.class); startActivity(intent_1_to_2); Intent Intent intent_2_to_1 = new Intent(this, Activity1.class); startActivity(intent_2_to_1);
Android Activities Exercise (Contd.) How to navigate from one Activity to another Intent Intent intent1to2 = new Intent(this, Activity2.class); startActivity(intent1to2); Intent Intent intent2to1 = new Intent(this, Activity1.class); startActivity(intent2to1);
Activity Lifecycle
Activity Lifecycle (Contd.)

More Related Content

PPT
Day: 2 Environment Setup for Android Application Development
PPT
Day 3: Getting Active Through Activities
PPT
Day 4: Android: UI Widgets
PPTX
Android MapView and MapActivity
PPTX
Android Workshop: Day 1 Part 3
PDF
AndroidManifest
PDF
Training android
PPTX
Day 15: Working in Background
Day: 2 Environment Setup for Android Application Development
Day 3: Getting Active Through Activities
Day 4: Android: UI Widgets
Android MapView and MapActivity
Android Workshop: Day 1 Part 3
AndroidManifest
Training android
Day 15: Working in Background

What's hot (20)

PDF
Sensors in Android (old)
PPTX
Android UI
PPT
android layouts
PDF
Ui layout (incomplete)
PPT
Day 4: Android: Getting Active through Activities
PPTX
Android 1.8 sensor
PPTX
Android Application Component: BroadcastReceiver Tutorial
PDF
Create yourfirstandroidapppdf
PPTX
PPTX
Android application-component
PDF
Marakana Android User Interface
DOC
Day 4: Activity lifecycle
PDF
Android session 2
PDF
Lecture 3 getting active through activities
PPT
Londroid Android Home Screen Widgets
PDF
Android session 1
PDF
Android session 3
PPTX
Android Services
PDF
Day 1 Android: Before Getting Started
PPT
View groups containers
Sensors in Android (old)
Android UI
android layouts
Ui layout (incomplete)
Day 4: Android: Getting Active through Activities
Android 1.8 sensor
Android Application Component: BroadcastReceiver Tutorial
Create yourfirstandroidapppdf
Android application-component
Marakana Android User Interface
Day 4: Activity lifecycle
Android session 2
Lecture 3 getting active through activities
Londroid Android Home Screen Widgets
Android session 1
Android session 3
Android Services
Day 1 Android: Before Getting Started
View groups containers
Ad

Viewers also liked (15)

PPTX
Day 9: Make Your App Location Aware using Location API
PPT
Day 5: Android User Interface [View Widgets]
PDF
Day 8: Dealing with Lists and ListViews
PDF
List Views
PPT
Android User Interface: Basic Form Widgets
PDF
Lecture 5: Storage: Saving Data Database, Files & Preferences
PPTX
Introduction to Android Development: Before Getting Started
PPTX
Day: 1 Introduction to Mobile Application Development (in Android)
PDF
Day 2 android internals a quick overview
PPTX
Creating the first app with android studio
PPT
Day 6: Android BroadcastReceiver Component
PPT
Day 3: Getting Active Through Activities
PDF
Lecture 2(b) Android Internals A Quick Overview
PPTX
Day 15: Content Provider: Using Contacts API
PDF
Day1 before getting_started
Day 9: Make Your App Location Aware using Location API
Day 5: Android User Interface [View Widgets]
Day 8: Dealing with Lists and ListViews
List Views
Android User Interface: Basic Form Widgets
Lecture 5: Storage: Saving Data Database, Files & Preferences
Introduction to Android Development: Before Getting Started
Day: 1 Introduction to Mobile Application Development (in Android)
Day 2 android internals a quick overview
Creating the first app with android studio
Day 6: Android BroadcastReceiver Component
Day 3: Getting Active Through Activities
Lecture 2(b) Android Internals A Quick Overview
Day 15: Content Provider: Using Contacts API
Day1 before getting_started
Ad

Similar to Multiple Activity and Navigation Primer (20)

PPTX
Activity & Shared Preference
PPTX
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
PPT
21 android2 updated
DOCX
Activity
DOCX
Activity
DOCX
Activity
DOCX
Activity
PPTX
Android application componenets for android app development
PPTX
Android apps development
PPTX
Lecture #1 Creating your first android project
PDF
Android development - Activities, Views & Intents
PDF
android_mod_3.useful for bca students for their last sem
PPT
Mobile Application Development With Android
PPTX
Hello android example.
PDF
Android app development guide for freshers by ace web academy
PPTX
Android development session 2 - intent and activity
DOC
ANDROID LAB MANUAL.doc
DOCX
Android Application Components with Implementation & Examples
PPT
android activity
PPTX
Intents in Mobile Application Development.pptx
Activity & Shared Preference
MAD Unit 5.pptxxxxxxxxxxxxxxxxxxxxxxxxxx
21 android2 updated
Activity
Activity
Activity
Activity
Android application componenets for android app development
Android apps development
Lecture #1 Creating your first android project
Android development - Activities, Views & Intents
android_mod_3.useful for bca students for their last sem
Mobile Application Development With Android
Hello android example.
Android app development guide for freshers by ace web academy
Android development session 2 - intent and activity
ANDROID LAB MANUAL.doc
Android Application Components with Implementation & Examples
android activity
Intents in Mobile Application Development.pptx

More from Ahsanul Karim (8)

PDF
Lecture 1 Session 1 Before Getting Started
PDF
লেকচার ১ (ক)- শুরুর আগে:
PDF
Day 8: Dealing with Lists and ListViews
PDF
Mobile Banking in Bangladesh: An Incomplete Study
PDF
GCM for Android
PPTX
Action Bar Sherlock tutorial
PPTX
Android Workshop Day 1 Part 2
PPTX
Android before getting started
Lecture 1 Session 1 Before Getting Started
লেকচার ১ (ক)- শুরুর আগে:
Day 8: Dealing with Lists and ListViews
Mobile Banking in Bangladesh: An Incomplete Study
GCM for Android
Action Bar Sherlock tutorial
Android Workshop Day 1 Part 2
Android before getting started

Recently uploaded (20)

PPTX
Pharma ospi slides which help in ospi learning
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Pre independence Education in Inndia.pdf
PDF
Business Ethics Teaching Materials for college
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Insiders guide to clinical Medicine.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Structure & Organelles in detailed.
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Basic Mud Logging Guide for educational purpose
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Pharma ospi slides which help in ospi learning
Microbial diseases, their pathogenesis and prophylaxis
Pre independence Education in Inndia.pdf
Business Ethics Teaching Materials for college
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
VCE English Exam - Section C Student Revision Booklet
Insiders guide to clinical Medicine.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Microbial disease of the cardiovascular and lymphatic systems
Basic Mud Logging Guide for educational purpose
O5-L3 Freight Transport Ops (International) V1.pdf
Final Presentation General Medicine 03-08-2024.pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf

Multiple Activity and Navigation Primer

  • 1. Android Application Development Being Active Through Activities & Intents Ahsanul Karim [email_address] Sentinel Solutions Ltd. http://www.sentinelbd.com
  • 2. Today We’re Covering… Application Structure Android Application Anatomy Activity Layout Using Layouts from Activity Activity to Activity Transition Activity Lifecycle Exercise
  • 3. Android Activities Activity Activity provides a user generally with an interactive screen to do something like: Dialing the phone, View a map List of something for user to select or Anything you want your user to do An application usually consists of multiple activities. Typically, one activity in an application is specified as the &quot; main &quot; activity, which is presented to the user when launching the application for the first time. (which is specified in AndroidMenifest.xml )  The   <action>  element specifies that this is the &quot;main&quot; entry point to the application. The  <category>  element specifies that this activity should be listed in the system's application launcher (to allow users to launch this activity).
  • 4. Android Activities (Contd..) Creating Activity We have already created Activities. But how did we create it? Let’s revisit… We created subclass of Activity base class We implemented one callback method onCreate What is creating subclass??? What is callback methods??? Open Questions:
  • 5. Android Activities (Contd..) Next Step: Implementing User Interface Design res/layout/yourlayout.xml Use Views from Activity class Next Step: Implementing User Interface <manifest ... >   <application ... >       <activity android:name=&quot;.ExampleActivity&quot; />       ...   </application ... >   ... </manifest > Next Step: Starting Activity Intent intent = new Intent(this, ToActivity.class); startActivity(intent); We can start another activity by calling  startActivity() , passing it an  Intent  that describes the activity you want to start.
  • 6. Android Activities Exercise We’ll make 2 Activities Registration with basic features and validation: Email address First Name, Last Name Date of Birth Password Confirm Password I agree to terms and conditions Buttons: Cancel, Submit Login Email address Password Buttons: New User, Login (To be added: Remember me) Link: http://developer.android.com/guide/appendix/faq/commontasks.html
  • 7. Android Activities Exercise (Contd.) How to add new Activities to the application How to navigate from one Activity to another How to navigate from one Activity to another Intent Intent intent_1_to_2 = new Intent(this, Activity2.class); startActivity(intent_1_to_2); Intent Intent intent_2_to_1 = new Intent(this, Activity1.class); startActivity(intent_2_to_1);
  • 8. Android Activities Exercise (Contd.) How to navigate from one Activity to another Intent Intent intent1to2 = new Intent(this, Activity2.class); startActivity(intent1to2); Intent Intent intent2to1 = new Intent(this, Activity1.class); startActivity(intent2to1);