0% found this document useful (0 votes)
2 views3 pages

Android_MAD_Answers_Part1

The document provides various Android development topics including a program for a broadcast receiver that detects airplane mode changes, the importance of the developer console, and the need for permissions like camera and Bluetooth. It also outlines the steps to publish an app on the Play Store and includes syntax for geocoding and a program for temperature conversion using sensors. Additionally, it lists features of the developer console such as app management and performance stats.
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)
2 views3 pages

Android_MAD_Answers_Part1

The document provides various Android development topics including a program for a broadcast receiver that detects airplane mode changes, the importance of the developer console, and the need for permissions like camera and Bluetooth. It also outlines the steps to publish an app on the Play Store and includes syntax for geocoding and a program for temperature conversion using sensors. Additionally, it lists features of the developer console such as app management and performance stats.
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
You are on page 1/ 3

Android MAD Questions with Answers

1. Write a program for broadcast receiver for airplane mode changed.

Java Code:

public class AirplaneModeReceiver extends BroadcastReceiver {

@Override

public void onReceive(Context context, Intent intent) {

boolean isAirplaneModeOn = intent.getBooleanExtra("state", false);

if (isAirplaneModeOn) {

Toast.makeText(context, "Airplane Mode ON", Toast.LENGTH_SHORT).show();

} else {

Toast.makeText(context, "Airplane Mode OFF", Toast.LENGTH_SHORT).show();

Manifest Permission:

<receiver android:name=".AirplaneModeReceiver">

<intent-filter>

<action android:name="android.intent.action.AIRPLANE_MODE" />

</intent-filter>

</receiver>

2. State importance of developer console.

- Upload and distribute apps.

- View app statistics (downloads, crashes, etc).

- Respond to user reviews.


- Manage app pricing and availability.

- Analyze revenue reports.

3. Discuss the need of permissions in Android. Describe the permission to set system functionalities

like Bluetooth & camera.

<uses-permission android:name="android.permission.CAMERA"/>

<uses-permission android:name="android.permission.BLUETOOTH"/>

4. Steps to publish android app on Play Store:

1. Create a developer account.

2. Create a new app and fill info.

3. Upload APK/AAB file.

4. Set rating, pricing, and countries.

5. Submit and publish after approval.

5. Syntax for Geocoding:

Geocoder geocoder = new Geocoder(this);

List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1);

6. Developer Console Features:

- App management.

- Performance stats.

- Crash reports.

- User feedback.

7. Program to convert Celsius to Fahrenheit using sensor:

Java code and XML layout shown in app with SensorManager and
TYPE_AMBIENT_TEMPERATURE.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy