Docsity

Question – Mobile Development, Quizzes of Mobile Computing

Toggle sidebar
bg1
Question – Mobile Development
Lesson 1: Introduction to Android
Q: What are the four main Android application
components?
➢ A: Activity, Service, Content Provider, Broadcast
Receiver.
Q: What replaced Dalvik VM in Android 5.0?
➢ A: ART (Ahead-of-Time runtime).
Lesson 2: Application Structure
Q: Which directory stores images and graphics?
➢ A: drawable/.
Q: How do you access a string resource in XML?
➢ A: @string/resource_name.
Lesson 3: Activities & Layouts
Q: Which lifecycle method is called when an Activity is first
created?
➢ A: onCreate().
Q: What does android:layout_weight do in LinearLayout?
➢ A: Distributes extra space among child views.
Lesson 4: Intents & Event Handling
Q: Difference between explicit and implicit intents?
➢ A: Explicit → target class specified; Implicit →
action specified, resolved via filters.
Q: Which method handles results from
startActivityForResult()?
➢ A: onActivityResult().
Lesson 5: Menus
Q: Which methods are overridden for Option Menu?
➢ A: onCreateOptionsMenu() and
onOptionsItemSelected().
Q: How is a Context Menu triggered?
➢ A: By long-pressing a view.
Lesson 6: Dialogs
Q: Which method creates a single-choice list dialog?
➢ A: setSingleChoiceItems().
Q: What is a DialogFragment?
➢ A: A fragment that displays a dialog window,
lifecycle-aware.
Lesson 7: Adapter
Q: What is the role of an Adapter?
➢ A: Bridge between data source and UI
components.
Q: Which Adapter is used for custom row layouts?
➢ A: Custom Adapter (extends BaseAdapter or
RecyclerView.Adapter).
Lesson 8: Data Storage
Q: Which storage option is best for simple settings?
➢ A: SharedPreferences.
Q: Which class manages SQLite database creation and
versioning?
➢ A: SQLiteOpenHelper.
Lesson 9: API & Server Communication
Q: What is JSON used for?
➢ A: Lightweight format for storing/exchanging data.
Q: Which library simplifies REST API calls in Android?
➢ A: Retrofit.
Lesson 10: Retrofit & AsyncTask
Q: Which AsyncTask method runs background work?
➢ A: doInBackground().
Q: Which Retrofit annotation sends form data?
➢ A: @FormUrlEncoded with @Field.

Partial preview of the text

Download Question – Mobile Development and more Quizzes Mobile Computing in PDF only on Docsity!

Question – Mobile Development

Lesson 1: Introduction to Android Q: What are the four main Android application components? ➢ A: Activity, Service, Content Provider, Broadcast Receiver. Q: What replaced Dalvik VM in Android 5.0? ➢ A: ART (Ahead-of-Time runtime). Lesson 2: Application Structure Q: Which directory stores images and graphics? ➢ A: drawable/. Q: How do you access a string resource in XML? ➢ A: @string/resource_name. Lesson 3: Activities & Layouts Q: Which lifecycle method is called when an Activity is first created? ➢ A: onCreate(). Q: What does android:layout_weight do in LinearLayout? ➢ A: Distributes extra space among child views. Lesson 4: Intents & Event Handling Q: Difference between explicit and implicit intents? ➢ A: Explicit → target class specified; Implicit → action specified, resolved via filters. Q: Which method handles results from startActivityForResult()? ➢ A: onActivityResult(). Lesson 5: Menus Q: Which methods are overridden for Option Menu? ➢ A: onCreateOptionsMenu() and onOptionsItemSelected(). Q: How is a Context Menu triggered? ➢ A: By long-pressing a view. Lesson 6: Dialogs Q: Which method creates a single-choice list dialog? ➢ A: setSingleChoiceItems(). Q: What is a DialogFragment? ➢ A: A fragment that displays a dialog window, lifecycle-aware. Lesson 7: Adapter Q: What is the role of an Adapter? ➢ A: Bridge between data source and UI components. Q: Which Adapter is used for custom row layouts? ➢ A: Custom Adapter (extends BaseAdapter or RecyclerView.Adapter). Lesson 8: Data Storage Q: Which storage option is best for simple settings? ➢ A: SharedPreferences. Q: Which class manages SQLite database creation and versioning? ➢ A: SQLiteOpenHelper. Lesson 9: API & Server Communication Q: What is JSON used for? ➢ A: Lightweight format for storing/exchanging data. Q: Which library simplifies REST API calls in Android? ➢ A: Retrofit. Lesson 10: Retrofit & AsyncTask Q: Which AsyncTask method runs background work? ➢ A: doInBackground(). Q: Which Retrofit annotation sends form data? ➢ A: @FormUrlEncoded with @Field.