Вы находитесь на странице: 1из 7

3/13/2014

android interview questions and answers paper 13


Like 195 people like this. Sign Up to see w hat your friends like.

First time user? Register | Sign In

Home

Submit/Ask Question

How to Use

Show my Statistics

Contact Us

Select chapter
Android All (31.Papers) basics (5.Papers) activities (5.Papers) services (2.Papers) threads (2.Papers) receivers (1.Papers) Show all chapters

Home > Technical > Android > Paper- 10 6 ? ? 1.Show Questions only 7 8 9 10 11 12

Fresher interview questions Experienced interview questions

1.Important

Submit a Question

Submit Paper

Sponsored Links

1 Says Important 1 People Like it

RateToughness

Fresher interview question 1 Explain the life cycle of an activity, in android? Toughness

A. Below cycle is always true. onCreate-> onStart() -> onResume() -> onPause() -> onStop() -> onDestroy() B. Below cycle executes always. onCreate-> onStart() -> onRestoreInstanceState() -> onResume() -> onSaveInstanceState() -> onPause() -> onStop() -> onDestroy() C. Below cycle executes always. onCreate-> onStart() -> onResume() -> onStop() -> onPause -> onDestroy() D. Below cycle executes always. onCreate-> onStart() -> onRestoreInstanceState() -> onResume() -> onPause() -> onSaveInstanceState() -> onStop() -> onDestroy()

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

2 In Activity's onCreate function, What is the purpose of super.oncreate() ? Toughness

Design logos & websites


www.m aacindia.com 12-m onth course to work in m e dia Join MAAC Multim e dia course today!

A. It gives permission to use your phone screen B. it calls super class constructor C. it does nothing , simply a return statement will be there in super class D. it will create graphical window for sub class.

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Fresher interview question 3 Is it mandatory to implement oncreate() & onstart() of activity life cycle ? Will it run if those life cycle methods

http://skillgun.com/android/interview-questions-and-answers/paper/13

are removed?

1/7

3/13/2014
are removed?

android interview questions and answers paper 13


Toughness

A. it gives compile time error C. nothing will happen it will run perfectly D. your phone will hang

B. run time exception, supernotcalled

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Fresher interview question 4 Is it possible to have an Activity without UI? Toughness

A. not possible B. yes, if it is doing some functionality with out UI

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Fresher interview question 5 How to start an activity to get response? Or How to start an activity to get result? Toughness

A. startActivityOnResult() C. startActivity()

B. startActivityForResult() D. setResult()

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Fresher interview question 6 Activity life cycle: When LCD goes off, what is the life cycle function gets called in activity?

i. onPause() ii. onStop() iii. onSaveInstanceState()


Toughness

A. i C. i & ii

B. ii D. i, ii, & iii

http://skillgun.com/android/interview-questions-and-answers/paper/13

2/7

3/13/2014

android interview questions and answers paper 13


Show Answer and Explanation Share it on

0 Says Important 0 People Like it

RateToughness

Fresher interview question 7 Activity life cycle: When a new activity comes on top of your activity completely, then what is the life cycle

function that gets executed in the old activity?


Toughness

A. it calls onPause() C. it calls onPause() -> then -> onStop() -> onDestroy() D. it calls onPause() -> then -> onSaveInstanceState()

B. it calls onPause() -> then -> onStop()

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

8 Activity life cycle: When a dialog is displayed on top of your activity, is your activity in foreground state or visible

state?
Toughness

A. it calls onPause() B. it calls onPause() -> then -> onStop() -> onDestroy() C. it calls onPause() -> then -> onStop() D. it calls onResume()

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

9 start an activity with startactivityforresult(), and the child activity gets crashed. Now what is the result code

obtained by the parent?


Toughness

A. RESULT_OK C. RESULT_CRASH

B. RESULT_CANCELLED D. RESULT_FINISH

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

10 What are the data storage options in android? Note: persistent data.

i. files, arrays, database ii. files, databses iii. using network servers
Toughness

A. i C. i & iii

B. ii D. ii & iii

http://skillgun.com/android/interview-questions-and-answers/paper/13

3/7

3/13/2014

android interview questions and answers paper 13

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Experienced interview question 11 Android ANR(Application Not Responding) : What is the UI response time limit in android. (I.E with in how many

seconds main thread has to respond to user actions?)


Toughness

A. 5 sec C. 1 sec

B. 10 sec D. 2 sec

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

12 What is the intent-filter of main activity that launches your application's main screen? Toughness

A. <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> B. <intent-filter> <action android:name="Intent.MAIN" /> <category android:name="Category.LAUNCHER" /> </intent-filter> C. It will not have any intent-filter by default. D. <intent-filter> <action android:name="android.intent.action.LAUNCHER" /> <category android:name="android.intent.category.MAIN" /> </intent-filter>

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

13 How to create UI (user interface) without using xml file? Show with one example on how to create a button

without having xml file?


Toughness

A. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } B. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button b; setContentView(b); } C. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

http://skillgun.com/android/interview-questions-and-answers/paper/13

4/7

3/13/2014

android interview questions and answers paper 13


super.onCreate(savedInstanceState); Button b = new Button(this); setContentView(b); } D. @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button b = findViewById(R.id.button1); setContentView(b); }

Show Answer and Explanation

Share it on

0 Says Important 1 People Like it

RateToughness

Fresher interview question 14 Activity life cycle: What is the mandatory activity life cycle function that will get called in case of configuration

changes?
Toughness

A. onStop() C. onSaveInstanceState()

B. onPause() D. both 2 and 3

Show Answer and Explanation

Share it on

0 Says Important 1 People Like it

RateToughness

Experienced interview question 15 Activity life cycle onStop: Can I save all my databse table updates in onStop() of activity? If not explain why and

also explain where should I save db tables?


Toughness

A. Yes we can. C. No, because onStop will never be called

B. No, save it in onSaveInstanceState

D. No, because onStop() may not be called in some situations.

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

16 What is difference between persistent data and transient data? Toughness

A. Persistent data is temporary data, eg: creating an array in the program. B. transient data is temporary data, that we store in database tables C. Persistent data is permanent data that we store, eg in database tables, and transient data is logical data that we use in programming logic. D. reverse of option 3

http://skillgun.com/android/interview-questions-and-answers/paper/13

5/7

3/13/2014

android interview questions and answers paper 13


Show Answer and Explanation Share it on

0 Says Important 0 People Like it

RateToughness

17 What will happen if super.oncreate() from oncreate() function of activity is commented? Toughness

A. Compile time error

B. Run time exception, super not called.

C. Nothing will happen, it will still execute with empty windos D. nothing will happen, it will execute with proper output

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Experienced interview question 18 What is the difference between this context and getapplicationcontext ? which one to use when? Toughness

A. no difference, both are same B. this points to entire process, appcontext points to current class. C. this points to current context, application context points to entire process. if your context is of entire life time of process then use app context, else this. D. both option 2 and 3 are correct

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

19 Where to register broadcast receivers that updates UI? If I have a broadcast receiver that updates my UI

frequently, then where should I register that broadcast receiver in my activity life cycle functions?
Toughness

A. oncreate() C. onresume()

B. onstart() D. onsaveinstancestate()

Show Answer and Explanation

Share it on

0 Says Important 0 People Like it

RateToughness

Experienced interview question 20 Save image in onsaveinstatncestate: A heavy image downloaded from internet in onCreate() of an activity. Is it

possible to save it in onsaveinstancestate() in case of configurationChanges?


Toughness

http://skillgun.com/android/interview-questions-and-answers/paper/13

6/7

3/13/2014
A. yes

android interview questions and answers paper 13


B. no, we have to save it in onPause()

C. no, we have to use some static reference to it. D. no, we don't need to save it at all.

Show Answer and Explanation

Share it on

Android Database

Interview Skill

Job Interview

New Android Phone

2014 Palle Technologies Terms of Service PrivacyPolicy About Us Report Bug

Bookmark to -

http://skillgun.com/android/interview-questions-and-answers/paper/13

7/7

Вам также может понравиться