Fundamentals of Mobile Programming Answer Sheet 2

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

1 What are Activities and Fragments in Android?

Answer:
● Activities: Single, focused tasks that the user can interact with. An application can have
multiple activities.
● Fragments: Reusable UI components within activities that allow for a more modular
design and support multiple screen sizes and orientations.

2. What is the ViewController in iOS?


● Answer:
A ViewController is a fundamental building block of an iOS application, responsible for
managing a portion of the app’s user interface and its interactions. It coordinates between the
app’s data and the views that display that data to the user.

3. How do you handle user input in mobile applications?


Answer:
● Android: Using event listeners (e.g., OnClickListener for buttons) and handling touch
events via methods like onTouchEvent.
● iOS: Using target-action patterns, delegates, and gesture recognizers to handle user
interactions with the UI elements.

4. What are the common methods for data storage in mobile applications?
Answer:
● Internal Storage: Storing private data within the app’s directory.
● External Storage: Storing data on the device’s external storage (e.g., SD card).
● Databases: Using SQLite databases or Room persistence library (Android) and Core
Data (iOS) for structured data storage.
● Shared Preferences/User Defaults: Storing simple key-value pairs.

5. What are the steps to publish an app on Google Play Store and Apple
App Store?
Answer:
● Google Play Store:
1. Create a Google Play Developer account.
2. Prepare your app (including APK, assets, and metadata).
3. Test the app thoroughly.
4. Create a new app entry in the Google Play Console.
5. Upload the APK, add app details, set pricing, and publish.
● Apple App Store:
1. Enroll in the Apple Developer Program.
2. Prepare your app (including app binaries, icons, and metadata).
3. Test the app using TestFlight.
4. Create a new app entry in App Store Connect.
5. Upload the app via Xcode, add app details, submit for review, and publish.

You might also like