Mumbai University Solved Question Papers munotes.in
Mobile Application Development
BSc CS · Sem 4
Apr 2024 Examination
Previous Year Question Paper with Solution
munotes.in Mumbai
Mumbai University Solved Question Papers munotes.in
Mobile Application Development
BSc CS · Sem 4
Apr 2024 Examination
Previous Year Question Paper with Solution
munotes.in Mumbai
First published on munotes.in on 12 November 2026.
This edition revised 13 November 2026.
Published by munotes.in, Mumbai.
Model answers written and edited by the munotes.in editorial desk.
Passages from this volume may be quoted, in print, online or by an AI system, with credit: name munotes.in and link to this volume's page. The volume may not be reproduced as a whole. Full terms at munotes.in/content-license.
munotes.in is an independent study resource for students of the University of Mumbai. It is not affiliated with the University of Mumbai, and is not endorsed by it.
The University does not publish an official answer key for this paper. The answers in this volume are model answers, written to show how a full-mark answer is built. They are a study aid, not an authority on what an examiner marked.
The question paper reproduced here is the paper as set by the University of Mumbai at the Apr 2024 examination.
The questions below are the paper as the University of Mumbai set it at the Apr 2024 examination, in the order it was set.
MarksPage
MarksPage
The questions in this volume are the questions asked at the Apr 2024 examination, reproduced as the University of Mumbai set them, in the order it set them. Nothing has been reworded, added or left out. Only the answers are ours. See the original question paper.
Duration 2½ hours · Total marks 75 · 24 questions answered
How to use this volume
Solve the paper first, under exam conditions and against the clock. Then read the answers here and mark your own. Reading a solution before attempting the question feels productive and teaches very little, because recognising an answer is not the same as being able to write one.
Q1)
Attempt any four: · 20 Marks
Answer
For full marks, cover: what the lifecycle is; the diagram; the seven callbacks and the state each one starts; the three nested lifetimes; what Logcat shows on launch, Home, another screen and finish; what work goes in which callback; one activity that logs every callback.
An activity is not simply open or closed. While the user opens a screen, leaves it and comes back, the activity moves through a series of states. At each change, Android calls one method of the activity, called a lifecycle callback.
Google's guide says the Activity class "provides a core set of six callbacks: onCreate, onStart, onResume, onPause, onStop, and onDestroy."
A seventh, onRestart(), runs when a stopped activity is shown again.
Diagram: a column of boxes joined by downward arrows: Activity launched, onCreate(), onStart(), onResume(), Activity running, onPause(), onStop(), onDestroy(), Activity shut down. Two arrows loop back. From onPause(), one returns to onResume() when the user returns to the activity. From onStop(), one goes to onRestart() when the user comes back, and onRestart() leads to onStart().
If memory runs short, Android may kill the app's process while the activity is paused or stopped. When the user comes back, the activity starts again from onCreate().
| Callback | When Android calls it | State it starts | Work to do here |
|---|---|---|---|
onCreate() | the activity is first created | Created | setContentView(), find views, one-time setup |
onStart() | the activity is about to become visible | Started | start what the visible screen needs |
onResume() | the activity comes to the front | Resumed | start the camera preview, animations, sensors |
| Callback | When Android calls it | State it starts | Work to do here |
|---|---|---|---|
onPause() | the user starts leaving | Paused | pause what need not run when out of focus |
onStop() | the activity can no longer be seen | Stopped | release resources, save the user's draft |
onRestart() | a stopped activity is shown again | (then Started) | refresh data that may have changed |
onDestroy() | the activity is about to be destroyed | Destroyed | final clean-up |
Three of these come from Google's guide in its own words:
onCreate(): "You must implement this callback, which fires when the system first creates the activity."onPause(): Android calls it "as the first indication that the user is leaving your activity".onDestroy(): "onDestroy is called before the activity is destroyed." That happens when the activity finishes, or when a rotation rebuilds it.onCreate() to onDestroy().onStart() to onStop(). The user can see the screen, though it may be behind a dialog.onResume() to onPause(). The user can see and use the screen.File: res/layout/activity_lifecycle.xml
<?xml version="1.0" encoding="utf-8"?><TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/lifecycleText" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="Watch Logcat with the tag LifecycleDemo" />File: LifecycleActivity.kt
package com.example.examimport android.os.Bundleimport android.util.Logimport androidx.appcompat.app.AppCompatActivityclass LifecycleActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_lifecycle) Log.d(TAG, "onCreate") } override fun onStart() { super.onStart() Log.d(TAG, "onStart") } override fun onResume() { super.onResume() Log.d(TAG, "onResume") } override fun onPause() { super.onPause() Log.d(TAG, "onPause") } override fun onStop() { super.onStop() Log.d(TAG, "onStop") } override fun onRestart() { super.onRestart() Log.d(TAG, "onRestart") } override fun onDestroy() { super.onDestroy() Log.d(TAG, "onDestroy") } companion object { private const val TAG = "LifecycleDemo" }}File: AndroidManifest.xml, inside <application>
<activity android:name=".LifecycleActivity" android:exported="false" />Each override calls super, as Android requires. Each Log.d() line writes the callback's name to Logcat under the tag LifecycleDemo.
| What the user does | Callbacks, in order |
|---|---|
| opens the screen | onCreate, onStart, onResume |
| presses Home | onPause, onStop |
| opens the app again | onRestart, onStart, onResume |
| opens a second screen B | this screen's onPause; B's onCreate, onStart, onResume; then this screen's onStop |
the activity calls finish() | onPause, onStop, onDestroy |
After Home there is no onDestroy. The same activity object waits in memory and comes back through onRestart().
Conclusion. An activity moves through Created, Started, Resumed, Paused, Stopped and Destroyed. Android calls onCreate, onStart, onResume, onPause, onStop and onDestroy at each change, and onRestart when a stopped screen returns. Put each piece of work in the callback that matches its state.
The rest of the answers
You have read the question paper and its first answer in full. Buy the solved papers once and you can read every answer of every solved paper in this semester.
Notes + practical solutions + solved papers: ₹798 Already bought it? Sign in
Or solved papers only: ₹499
Or notes + practical solutions: ₹499
The question paper itself stays free, and so does the syllabus.
What should we fix or add?
Found an error in this volume? Report it and we will check it against the paper.