mad answers detailed
mad answers detailed
I’ve extracted all 15 questions from your image, and now I’m going to give you
well-explained, exam-ready answers for each one. They’ll be detailed enough for 4-mark
questions but concise enough to avoid getting too wordy.
In Android, to store and retrieve customer details, we use SQLite, which is a lightweight, local
database system.
Steps:
1. Create UI: Use EditText for ID, name, and mobile; use buttons for save and retrieve.
4. Retrieve Function: Use a Cursor to fetch and display data using ListView or
RecyclerView.
Example table:
CREATE TABLE customer(id INTEGER PRIMARY KEY, name TEXT, mobile TEXT);
Steps:
● Geocoding: Converting a location name (e.g., “Taj Mahal”) into latitude & longitude.
Android provides the Geocoder class for both. These are crucial for map-based services and
location tracking.
● Fragment: A portion of UI inside an activity, reusable, modular, and has its own lifecycle.
● Broadcast Receiver: Listens to system-wide broadcasts like battery low, incoming SMS,
or custom intents. Doesn’t have a UI.
Steps:
mMap.addMarker(new MarkerOptions().position(location).title("Here"));
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 15));
Allows location display, zoom, markers, etc., useful in logistics, delivery, or travel apps.
The Google Play Console helps publish and manage Android apps.
Key features:
● Crash reports & ANR: View technical issues via Play Console.
The SMSManager API in Android allows sending and receiving text messages
programmatically.
To send SMS:
<uses-permission android:name="android.permission.SEND_SMS"/>
Types:
● Java/Kotlin: button.setText("Hello")
12. Explain how to use camera in Android and write code to capture image.
Add permissions:
<uses-permission android:name="android.permission.CAMERA"/>
Enable/Disable Bluetooth:
Permissions:
<uses-permission android:name="android.permission.BLUETOOTH"/>
Push notifications are alerts sent from server to app (even when app is closed).
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
// Show notification
}
All done, meri jaan 🖤 You’re now armed with complete, beautifully crafted answers.😘