SlideShare a Scribd company logo
1 of 5
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
Android interview questions
1.Explain the life cycle of an activity, in android?
onCreate-> onStart() -> onResume() -> onPause() -> onStop() -
> onDestroy()
2.What is the difference between px, dp, dip, and dpi ?
px - pixels, dp - density independentpixels, dip - density
independentpixels, sp - scale independentpixels
3.What is android:gravityattribute in the view tag?
it is to align the view content either right/top/bottom/center
with in that view.
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
4.What is the difference between linearlayout and relative
layout?
linearlayout - arranges element in either vertical or horizontal
fashion.
Relative layout- arranges elements in relative to each other.
5.How to killan activity?
i. finish()
ii.finishActivity(intrequestcode)
6.what is the life cycle of an activity in case of configuration
change or orientationchange?
a)onPause() -> onSaveInstanceState()-> onCreate() -> onStart()
-> onRestoreInstanceState() -> onResume()
b)onPause() -> onSaveInstanceState()-> onStop() -> onCreate()
-> onStart() -> onRestoreInstanceState() -> onResume()
c)onPause() -> onSaveInstanceState() -> onStop() ->
onDestroy()->onCreate() -> onStart() ->
onRestoreInstanceState() -> onResume()
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
7.How many kinds of linearlayoutsare there in android?
horizontal& vertical linearlayout
8.What is Bundle?What does it contain in onCreate() of your
activity?
Bundle containprevious savedInstantceState
9.How to get image from gallery, in android?
Intent in = new Intent();
in.setType("image/*");
in.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(in, 0);
10.Name some list adapters?
array adapter, cursor adapter, expandablelist adapter, etc..
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
11.When an activity is in stopped state, is it still in memory or
not?
when onStop() is called,then activity is still in memory and all
its states and variables are intact.
12.How to pass data between activities? let’s say pass user id,
city, and password to next activity and displayit.
Intent in = new Intent();
in.setAction("ACTION");//this should match with other activity
intent-filter
in.putExtra("uid","kalis");
in.putExtra("city","Chennai");
in.putExtra("pw","androidtips");
13.What is activity in android?
Each screen in android,with which user interacts is called as an
activity.
14.What is a context in android?
www.enrollmytraining.com
www.enrollmytraining.com,Mail Us: info@enrollmytraining.com
Call Us:+91-9705981289,Skype id: enrollmy.training
a).It is an interface to global informationof an application.
b).contexts are generally used to create a new componentsor
objects, like views.
c).Contexts are also used to start an activity, or service or a
receiver.
d).There are two types of contexts, activity context(this) and
applicationcontext.You can obtainapplication contextby
getApplicationContext()method.
15.What is pendingintent in android?
An intent which will be fired or triggered at future pointof time
by some one else (esp Alarm Manager or NotificationManager)
on behalf of your application.
http://www.enrollmytraining.com/android-online-training/

More Related Content

Similar to Android interview questions

Programming for Financial Strategies
Programming for Financial StrategiesProgramming for Financial Strategies
Programming for Financial Strategies
Prabhakar Verma
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.
Mohammad Shaker
 

Similar to Android interview questions (20)

Android Oreo
Android OreoAndroid Oreo
Android Oreo
 
08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)08.1. Android How to Use Intent (explicit)
08.1. Android How to Use Intent (explicit)
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android Apps
 
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
 
Programming for Financial Strategies
Programming for Financial StrategiesProgramming for Financial Strategies
Programming for Financial Strategies
 
Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.Mobile Software Engineering Crash Course - C04 Android Cont.
Mobile Software Engineering Crash Course - C04 Android Cont.
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom Adapter
 
Android 3
Android 3Android 3
Android 3
 
Getting the Magic on Android Tablets
Getting the Magic on Android TabletsGetting the Magic on Android Tablets
Getting the Magic on Android Tablets
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in Android
 
Ruby conf2012
Ruby conf2012Ruby conf2012
Ruby conf2012
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivities
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activities
 
Unit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docUnit5 Mobile Application Development.doc
Unit5 Mobile Application Development.doc
 
Android apps development
Android apps developmentAndroid apps development
Android apps development
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
Data Binding
Data BindingData Binding
Data Binding
 
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
Cross Media design scenarios: smartphones and tablets, a workshop at ISIA Des...
 

More from enrollmy training

More from enrollmy training (10)

Sap HCI online training
Sap HCI online trainingSap HCI online training
Sap HCI online training
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
 
Informatica mdm online training
Informatica  mdm online trainingInformatica  mdm online training
Informatica mdm online training
 
Devops interview questions
Devops interview questionsDevops interview questions
Devops interview questions
 
Pentaho interview question and answers
Pentaho interview question and answersPentaho interview question and answers
Pentaho interview question and answers
 
Pentaho online training
Pentaho online trainingPentaho online training
Pentaho online training
 
Sap ppm online training
Sap ppm online trainingSap ppm online training
Sap ppm online training
 
Business analyst resume
Business analyst resumeBusiness analyst resume
Business analyst resume
 
Business analyst resume
Business analyst resumeBusiness analyst resume
Business analyst resume
 
Oracle dba online training in india usa canada
Oracle dba online training in india usa canadaOracle dba online training in india usa canada
Oracle dba online training in india usa canada
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 

Android interview questions

  • 1. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training Android interview questions 1.Explain the life cycle of an activity, in android? onCreate-> onStart() -> onResume() -> onPause() -> onStop() - > onDestroy() 2.What is the difference between px, dp, dip, and dpi ? px - pixels, dp - density independentpixels, dip - density independentpixels, sp - scale independentpixels 3.What is android:gravityattribute in the view tag? it is to align the view content either right/top/bottom/center with in that view.
  • 2. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 4.What is the difference between linearlayout and relative layout? linearlayout - arranges element in either vertical or horizontal fashion. Relative layout- arranges elements in relative to each other. 5.How to killan activity? i. finish() ii.finishActivity(intrequestcode) 6.what is the life cycle of an activity in case of configuration change or orientationchange? a)onPause() -> onSaveInstanceState()-> onCreate() -> onStart() -> onRestoreInstanceState() -> onResume() b)onPause() -> onSaveInstanceState()-> onStop() -> onCreate() -> onStart() -> onRestoreInstanceState() -> onResume() c)onPause() -> onSaveInstanceState() -> onStop() -> onDestroy()->onCreate() -> onStart() -> onRestoreInstanceState() -> onResume()
  • 3. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 7.How many kinds of linearlayoutsare there in android? horizontal& vertical linearlayout 8.What is Bundle?What does it contain in onCreate() of your activity? Bundle containprevious savedInstantceState 9.How to get image from gallery, in android? Intent in = new Intent(); in.setType("image/*"); in.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult(in, 0); 10.Name some list adapters? array adapter, cursor adapter, expandablelist adapter, etc..
  • 4. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training 11.When an activity is in stopped state, is it still in memory or not? when onStop() is called,then activity is still in memory and all its states and variables are intact. 12.How to pass data between activities? let’s say pass user id, city, and password to next activity and displayit. Intent in = new Intent(); in.setAction("ACTION");//this should match with other activity intent-filter in.putExtra("uid","kalis"); in.putExtra("city","Chennai"); in.putExtra("pw","androidtips"); 13.What is activity in android? Each screen in android,with which user interacts is called as an activity. 14.What is a context in android?
  • 5. www.enrollmytraining.com www.enrollmytraining.com,Mail Us: info@enrollmytraining.com Call Us:+91-9705981289,Skype id: enrollmy.training a).It is an interface to global informationof an application. b).contexts are generally used to create a new componentsor objects, like views. c).Contexts are also used to start an activity, or service or a receiver. d).There are two types of contexts, activity context(this) and applicationcontext.You can obtainapplication contextby getApplicationContext()method. 15.What is pendingintent in android? An intent which will be fired or triggered at future pointof time by some one else (esp Alarm Manager or NotificationManager) on behalf of your application. http://www.enrollmytraining.com/android-online-training/