0% found this document useful (0 votes)
55 views4 pages

Model Answer Paper for Android 22617

The document is a model answer sheet for Android Programming, covering various topics such as the Android ecosystem, development tools, UI design layouts, and SMS services. It includes questions and answers on Android architecture, multimedia frameworks, app deployment, and permissions. Additionally, it provides practical examples like employee registration forms and feedback apps using SQLite.

Uploaded by

Shaunak Naik
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views4 pages

Model Answer Paper for Android 22617

The document is a model answer sheet for Android Programming, covering various topics such as the Android ecosystem, development tools, UI design layouts, and SMS services. It includes questions and answers on Android architecture, multimedia frameworks, app deployment, and permissions. Additionally, it provides practical examples like employee registration forms and feedback apps using SQLite.

Uploaded by

Shaunak Naik
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MSBTE Model Answer Sheet

Subject Code: 22617 (Android Programming)

Q1: Attempt any FIVE of the following (2 marks each)

a) Android Ecosystem

- Android OS, Android SDK, Google Play Store, Developer Community, Hardware Devices, Application

Framework and APIs

b) Tools for Android Application Development

- Android Studio, Android SDK, Android Virtual Device (AVD) Manager, Gradle Build System, Android Debug

Bridge (ADB)

c) Layouts in Android UI Design

- Linear Layout, Relative Layout, Constraint Layout, Frame Layout, Grid Layout, Table Layout

d) Attributes of EditText Control

- android:hint, android:inputType, android:text, android:textColor

e) Use of Fragments

- Modular portion of UI, reusable in multiple activities, supports flexible UI on large screens, enhances

maintainability

f) SMS Service

- Programmatic sending and receiving of SMS using SmsManager and BroadcastReceiver

g) Sensors in Android

- Accelerometer, Gyroscope, Proximity Sensor, Light Sensor, Magnetometer, Barometer

---

Q2: Attempt any THREE of the following (4 marks each)


a) Android and OHA

- Android is an open-source OS. OHA (Open Handset Alliance) is a consortium of companies to promote

innovation. OHA members (Google, Samsung etc.) collaborate to offer cheaper, better mobile experience

and rapid app development.

b) Dalvik Virtual Machine (DVM)

- Executes .dex files optimized for low memory. Sandboxes each app for security. Supports multiple

instances. Replaced by ART from Android 5.0.

c) Process of getting Map API Key

1. Create project on Google Cloud Console

2. Enable Maps SDK

3. Generate API Key

4. Restrict API Key (optional)

5. Add key in [Link]

d) Multimedia Framework

- Supports audio/video playback & recording. Components: MediaPlayer, MediaRecorder, AudioManager,

Camera API, MediaStore. Supports formats like MP3, MP4, H.264.

---

Q3: Attempt any THREE of the following (4 marks each)

a) Installation of Android Studio

1. Download from official site

2. Install Android Studio and SDK

3. Configure SDK and AVD

4. Setup environment

5. Create and run first project

b) GridView and Attributes


- Displays 2D grid. Attributes: numColumns, verticalSpacing, horizontalSpacing, stretchMode, gravity

c) Text-to-Speech

1. Initialize TextToSpeech object

2. Set language

3. Speak text using [Link]()

4. Shutdown tts

d) Deploying App on Google Play

1. Prepare app for release

2. Generate signed APK/AAB

3. Create developer account

4. Upload app

5. Fill app details

6. Set pricing & distribution

7. Publish app

---

Q4: Attempt any THREE of the following (4 marks each)

a) Directory Structure

- manifests/: Manifest file

- java/: Source code

- res/: Resources (layout, drawable, values)

- Gradle Scripts: [Link] files

b) Date and Time Picker

- DatePickerDialog & TimePickerDialog to select date and time

c) Property Animation

- ObjectAnimator animates properties like alpha, rotation, scale


d) Permissions

- Normal (auto granted), Dangerous (runtime request). Example: CAMERA permission

e) Current Location of Car

- Use FusedLocationProviderClient to get lat/lng and show location

---

Q5: Attempt any TWO of the following (6 marks each)

a) Employee Registration Form

- EditTexts: Name, ID, Email, Phone. Submit button

b) Feedback App with DB

- SQLiteOpenHelper to create DB. Insert and retrieve feedback data

c) Geocoding & Reverse Geocoding

- Geocoding: Address to lat/lng. Reverse Geocoding: lat/lng to address

---

Q6: Attempt any TWO of the following (6 marks each)

a) List Paired Bluetooth Devices

- [Link]()

b) Send SMS

- [Link]()

c) Linear & Frame Layout

- LinearLayout arranges views linearly. FrameLayout stacks views.

Common questions

Powered by AI

LinearLayout organizes UI components sequentially along a vertical or horizontal axis, suitable for simple lists or button stacks, offering flexibility with weight distribution among child views. FrameLayout, by contrast, layers components on top of each other, optimal for single widgets or simple overlays. Its primary use is in scenarios where one component needs prominence without altering sibling components' alignment .

Property animation involves animating arbitrary properties of objects such as alpha, rotation, and scale, using classes like ObjectAnimator and ValueAnimator. It enhances user experience by providing smooth transitions, feedback, and engagement, making interfaces feel dynamic. Applications include animating view properties during layout changes or to draw attention to updates. Effective use involves balancing aesthetics with performance considerations to avoid overloading the UI thread .

To deploy an Android app, a developer must first prepare the app for release, cleaning and testing it extensively. Generating a signed APK/AAB ensures authenticity. A Google Developer account is required to upload the app, followed by providing app details, including descriptions, screenshots, and promo materials. Setting pricing and regional distribution correctly aligns with the target audience. Notifications about content guidelines adherence and proactive maintenance plan implementation are crucial for ongoing success .

SmsManager is crucial for programmatically sending text messages within Android applications. It provides methods to divide long messages and handle pending intents for delivery confirmations. BroadcastReceiver complements this by managing incoming messages, enabling the application to respond or alert users. This combination allows seamless integration of SMS functionality but requires handling permissions and potential privacy concerns effectively .

Dalvik Virtual Machine enhances security by sandboxing each application, preventing unauthorized access. It executes .dex files, optimized for low memory, enabling multiple instances to run efficiently. ART, which replaced DVM from Android 5.0, uses ahead-of-time compilation but enhances performance with faster execution due to pre-compilation, yet consumes more storage for the compiled binaries. DVM's real-time execution contrasts ART's batch processing, balancing immediacy against speed .

Acquiring a Google Maps API Key involves creating a project on Google Cloud Console, enabling Maps SDK, and generating the API Key. It's advisable to restrict the API Key by defining where it can be used, enhancing security. The key must be added in the AndroidManifest.xml of the application. Considerations include understanding usage quotas and configuring billing for excess usage, as Google charges based on API requests .

Fragments enhance modularity by allowing reusable UI portions and lifecycle management within activities. They support flexible layouts in applications, particularly useful for tablets and desktops, where different fragments can be shown based on orientations or screen size. This modular approach increases maintainability and scalability of applications, promoting a consistent user interface experience across varying devices .

The Android ecosystem consists of key components like Android OS, Android SDK, Google Play Store, Developer Community, Hardware Devices, and Application Framework and APIs. Android OS forms the foundation, compatible with various hardware devices, while Android SDK provides tools and libraries to develop applications. Google Play Store serves as a distribution platform for applications. The developer community collaborates through forums, contributing to documentation and tools. Application framework and APIs facilitate application development by providing pre-defined structures and functionalities, enabling developers to create standardized applications .

GridView provides a flexible layout to display items in a two-dimensional scrolling grid, useful for showing large datasets or images. Its primary attributes include numColumns, verticalSpacing, horizontalSpacing, stretchMode, and gravity, allowing customization of item alignment and spacing. However, its limitations include less control over individual item positioning compared to ConstraintLayout and potential performance issues with complex datasets or when handling touch events extensively .

Using FusedLocationProviderClient involves initializing it with the application context and configuring the location request parameters, like accuracy and update frequency. The request location updates method is used to receive the location data asynchronously. Best practices include managing permissions carefully and handling location updates in background processes responsibly. It's important for applications to provide intuitive user navigation support, typically done by integrating retrieved location data with predefined map interfaces .

You might also like