Android Development Quiz
Android Development Quiz
Test your knowledge on Android development concepts with our engaging quiz! This quiz consists of 11 carefully crafted questions designed to challenge your understanding of key topics.
- Understand Activities and Intents
- Discover the lifecycle of an Activity
- Learn about Services and BroadcastReceivers
What is an Activity ?
A single, focused thing that the user can do, representing a screen
A sub-component of the UI that can represent a part of the screen, and can be reused
A utility class in Android that handles background work
How can you start an activity ?
By creating it like 'new MyActivity()' and calling start() on it
Using Intent and specifying the target activity class
By adding it in the AndroidManifest.xml file so it's started and handled by the system
Intent I = new Intent(); I.setAction(Intent.ACTION_VIEW);
This is an explicit intent
This is an implicit intent
This is an intent used for starting a service
How do you know what is the first activity launched by an app
It's the activity that extends 'LauncherActivity'
It's the activity that has an intent filter with 'category android:name="android.intent.category.LAUNCHER"'
It's the activity that has the flag FLAG_ACTIVITY_NEW_TASK
When is the activity's 'onActivityResult' called ?
When another activity was launched with 'startActivityForResult' from the current activity, and user returns back
When you call 'setResult(...)' from another activity that was launched from your initial activity
OnActivityResult is always called when returning to your activity
What is the sequence of activity callbacks when starting an activity ?
OnCreate() -> onStart()
OnCreate() -> onStart() -> onResume()
OnStart() -> onCreate() -> onResume()
What happens to the activity if you rotate the phone ?
Nothing, activity is rendered in landscape mode
Activity gets recreated
Activity is not recreated and the new layout for the requested orientation is used
What is a Service ?
Any external utility that the app uses and consumes
A component that can perform long-running tasks in the background
An Android component that has its own user interface
{"name":"Android Development Quiz", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Test your knowledge on Android development concepts with our engaging quiz! This quiz consists of 11 carefully crafted questions designed to challenge your understanding of key topics.Understand Activities and IntentsDiscover the lifecycle of an ActivityLearn about Services and BroadcastReceivers","img":"https:/images/course8.png"}