0% found this document useful (0 votes)
24 views2 pages

Extra 2 Marks Questions

The document outlines various attributes and methods related to Android UI components such as ToggleButton, RadioButton, and Google Map functionalities. It also explains the Android ecosystem, types of permissions, and details about audio/video classes and sensors. Additionally, it includes methods for DateTime Picker for handling date and time selections.

Uploaded by

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

Extra 2 Marks Questions

The document outlines various attributes and methods related to Android UI components such as ToggleButton, RadioButton, and Google Map functionalities. It also explains the Android ecosystem, types of permissions, and details about audio/video classes and sensors. Additionally, it includes methods for DateTime Picker for handling date and time selections.

Uploaded by

lillyforsuree
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Extra 2 Marks Questions

1. Attributes of ToggleButton:
- android:textOn – Text when button is ON
- android:textOff – Text when button is OFF
- android:checked – Sets initial checked state
- android:background – Sets background of button

2. Attributes of RadioButton:
- android:checked – If button is selected by default
- android:text – Text label
- android:buttonTint – Color of the button
- android:id – Unique ID to identify the RadioButton

3. Two Methods of Google Map:


- addMarker() – Adds a marker to map
- moveCamera() – Moves the camera to a location

4. Syntax for Intent and Explanation:


Syntax: Intent intent = new Intent(CurrentActivity.this, TargetActivity.class);
Intent is a messaging object used to start new activities, services, or send data between
components in Android.

5. What is Ecosystem in Android?


The Android ecosystem refers to the interdependence between Android OS, devices, apps,
Google services, APIs, developers, and users. All these components work together to provide
a seamless mobile experience.

7. Two Classes of Audio and Video:


Audio Classes:
- MediaPlayer – Plays audio files
- AudioTrack – Plays PCM audio streams manually

Video Classes:
- VideoView – Displays video content
- MediaPlayer – Plays video along with audio

8. Types of Permissions:
- Normal Permissions: Low-risk, granted automatically (e.g., Internet, Vibrate)
- Dangerous Permissions: High-risk, require user approval (e.g., Camera, Contacts)
- Signature Permissions: Granted only if the app is signed with the same certificate as the
app declaring the permission
9. Define Sensor, Types of Sensors, Methods in Sensors:
Sensor: A sensor detects physical data like motion, light, temperature, etc.

Types of Sensors:
- Motion Sensors (e.g., Accelerometer)
- Environmental Sensors (e.g., Light sensor, Temperature sensor)
- Position Sensors (e.g., Proximity sensor)

Methods:
- getSensorList() – Gets list of all sensors
- registerListener() – Registers sensor event listener
- onSensorChanged() – Called when sensor value changes

12. DateTime Picker Methods:


- show() – Displays the picker dialog
- setOnDateSetListener() – Callback for selected date
- setOnTimeSetListener() – Callback for selected time

You might also like