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

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)Oum Saokosal
 
Beginning Native Android Apps
Beginning Native Android AppsBeginning Native Android Apps
Beginning Native Android AppsGil Irizarry
 
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)
Встреча Google Post IO ( Владимир Иванов, Катерина Заворотченко и Сергей Комлач)Alina Vilk
 
Programming for Financial Strategies
Programming for Financial StrategiesProgramming for Financial Strategies
Programming for Financial StrategiesPrabhakar 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
 
TKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterTKU行動APP開發管理實務 - ListView & Custom Adapter
TKU行動APP開發管理實務 - ListView & Custom AdapterXavier Yin
 
What's New in Android
What's New in AndroidWhat's New in Android
What's New in AndroidRobert Cooper
 
Leture5 exercise onactivities
Leture5 exercise onactivitiesLeture5 exercise onactivities
Leture5 exercise onactivitiesmaamir farooq
 
Lecture exercise on activities
Lecture exercise on activitiesLecture exercise on activities
Lecture exercise on activitiesmaamir farooq
 
Unit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docUnit5 Mobile Application Development.doc
Unit5 Mobile Application Development.docKNANTHINIMCA
 
Android apps development
Android apps developmentAndroid apps development
Android apps developmentMonir Zzaman
 
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.Mathias Seguy
 
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)Gabor Varadi
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJSGregor Woiwode
 
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...Salvatore Iaconesi
 

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

Informatica mdm online training
Informatica  mdm online trainingInformatica  mdm online training
Informatica mdm online trainingenrollmy training
 
Pentaho interview question and answers
Pentaho interview question and answersPentaho interview question and answers
Pentaho interview question and answersenrollmy training
 
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 canadaenrollmy 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

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 

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/