Tricky questions... Or...not?

A vibrant and engaging illustration of an Android app developer working on a mobile application, surrounded by code snippets, diagrams of the Android lifecycle, and various icons representing Android components.

Ultimate Android Development Quiz

Test your knowledge with our Ultimate Android Development Quiz! Designed for both aspiring developers and seasoned pros, this quiz contains 15 tricky questions that cover essential concepts in Android development.

  • Evaluate your understanding of Android lifecycle
  • Challenge your comprehension of service behavior
  • Determine your knowledge of activity management
15 Questions4 MinutesCreated by CodingEagle43
You're using an app that should keep your really important input data in a DB, but someone keeps calling you, you also have 2 left hands and keep exitting the app and nothing seems to work today. Where should the app save the DB updates safely?
OnResume()
OnStop()
OnDestroy()
OnPause
You have a MainActivity that started a GameActivity, which has a running timer as it starts. You override the back button like this:
 
@Override public void onBackPressed() {
super.onBackPressed();
Intent I = new Intent(GameActivity.this,MainActivity.class);
startActivity(i);
finish();
}
but as you press back and you reach MainActivity again, the timer is still running in the backgroud. Where should you stop the timer?
OnResume()
OnPause
Lies, it'll work just fine
OnStop()
Can a user save all database updates in onStop ()?
Yes, a user can save all database updates in onStop()
No, a user can save in onSavedInstance()
No, a user can save in a Bundle()
No, In some situations, a user can't reach onStop()
What are the return values of onStartCommand() in android services?
START_STICKY
START_NOT_STICKY
START_REDELIVER_INTENT
All of the above
None of the above
Suppose we have activities A, B, C, D which go like this: A->B->C->D. If B has a SingleTask launching mode and we want to launch B again, how will the flow look like?
A->B->C->D->B
A->B->C->D
A->B
Impossible in this case
Which component is not activated by an Intent?
Activity
Services
ContentProvider
BroadcastReceiver
How do you stop a unbounded service?
StopSelf()
StopUnboundService()
StopService()
It stops when it finishes its tasks
When an activity doesn’t exist in memory it is in:
Starting state
Running state
Loading state
Inexistent state
Suppose we have activities A, B, C, D which go like this: A->B->C-D. If D has a SingleTop launching mode and we want to launch D again, how will the flow look like?
A->B->C->D->D
A->B->C->D
A->B->C->D (where D is a new instance of D Activity)
Impossible in this case
Which of the following should be used to save the unsaved data and release resources being used by an Android application?
Activity.onStop()
Activity.onPause()
Activity.onDestroy()
Activity.onShutdown()
What happens to a Bound Service when the app components bound to it, unbind?
The service destroyes itself
The service keeps running in the background
An exception is thrown
Once bound, you can't unbind
Paused is used
If the activity is at the background and still visible
If the activity is not visible
If the activity is at the foreground and visible
If the activity is at the foreground
{"name":"Tricky questions... Or...not?", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge with our Ultimate Android Development Quiz! Designed for both aspiring developers and seasoned pros, this quiz contains 15 tricky questions that cover essential concepts in Android development.Evaluate your understanding of Android lifecycleChallenge your comprehension of service behaviorDetermine your knowledge of activity management","img":"https:/images/course4.png"}
Powered by: Quiz Maker