Premium

Associate Android Developer Certification Questions and Answer (Dumps and Practice Questions)



Question : Which of these Activity class methods must be overridden when creating a Menu that is displayed
when the device's Menu button is pressed?

 : Which of these Activity class methods must be overridden when creating a Menu that is displayed
1. onCreateContextMenu

2. onMenuOpened

3. Access Mostly Uused Products by 50000+ Subscribers

4. openOptionsMenu

Correct Answer : Get Lastest Questions and Answer :
Explanation: Open MainActivity.java. onCreateOptionsMenu method is responsible for creating a menu. Menu object is passed to this method as a parameter. We will add our menu items into this object. The adding procedure is simple, add method is used. This method takes the text of the menu item as a parameter. Let's add 4 items

public boolean onCreateOptionsMenu(Menu menu) {
// TODO Auto-generated method stub

menu.add("menu1");
menu.add("menu2");
menu.add("menu3");
menu.add("menu4");

return super.onCreateOptionsMenu(menu);
}
onCreateOptionsMenu method returns a boolean result. True - show menu, False - do not show. So we could have made a checking of some condition, and as a result of this check do not show a menu returning False. We don't need this for now, so we delegate this choice to the method of superclass, it returns True by default.




Question : Which approval is necessary to execute Bluetooth actions such as connection requests,
connection receipt, and data forwarding?

 : Which approval is necessary to execute Bluetooth actions such as connection requests,
1. BLUETOOTH

2. BLUETOOTH_ADMIN

3. Access Mostly Uused Products by 50000+ Subscribers

4. ACCOUNT MANAGER

Correct Answer : Get Lastest Questions and Answer :
Explanation: public static final String BLUETOOTH

Added in API level 1
Allows applications to connect to paired bluetooth devices.

Protection level: normal

Constant Value: "android.permission.BLUETOOTH"
public static final String BLUETOOTH_ADMIN

Added in API level 1
Allows applications to discover and pair bluetooth devices.

Protection level: normal

Constant Value: "android.permission.BLUETOOTH_ADMIN"




Question : Which class is used when a sensor is accessed?

 : Which class is used when a sensor is accessed?
1. SensorEventListener

2. SensorEvent

3. Access Mostly Uused Products by 50000+ Subscribers

4. Sensor

Correct Answer : Get Lastest Questions and Answer :
Explanation: SensorManager lets you access the device's sensors. Get an instance of this class by calling Context.getSystemService() with the argument SENSOR_SERVICE.

Always make sure to disable sensors you don't need, especially when your activity is paused. Failing to do so can drain the battery in just a few hours. Note that the system will not disable sensors automatically when the screen turns off.


Related Questions


Question : Which of these is the incorrect explanation of the Java Native Interface(JNI)?

 : Which of these is the incorrect explanation of the Java Native Interface(JNI)?
1. JNI does not provide garbage collection on the native side, outside the memory resources of
the Java Virtual Machine.

2. Even if native code is used with JNI, it does not necessarily mean an improvement in the
application processing speed.

3. Access Mostly Uused Products by 50000+ Subscribers
side.

4. Header files generated on the Java side are included and implemented in the native (C/C++)
side source code.


Question : Which is the correct explanation of ListView?
A. It is necessary to use ListView as a set with ListActivity.
B. There is a function in ListView which displays a message when there is no information to be displayed.
C. When displaying an array using an Adapter class in ListView, it is necessary to convert it into a Collection class.
D. ListView has a function to display a list of uniquely defined Views other than TextView.

 : Which is the correct explanation of ListView?
1. It is necessary to use ListView as a set with ListActivity.

2. There is a function in ListView which displays a message when there is no information to be displayed.

3. Access Mostly Uused Products by 50000+ Subscribers

4. ListView has a function to display a list of uniquely defined Views other than TextView.



Question : Which of these Activity class methods must be overridden when creating a Menu that is displayed
when the device's Menu button is pressed?

 : Which of these Activity class methods must be overridden when creating a Menu that is displayed
1. onCreateContextMenu

2. onMenuOpened

3. Access Mostly Uused Products by 50000+ Subscribers

4. openOptionsMenu


Question : Which approval is necessary to execute Bluetooth actions such as connection requests,
connection receipt, and data forwarding?

 : Which approval is necessary to execute Bluetooth actions such as connection requests,
1. BLUETOOTH

2. BLUETOOTH_ADMIN

3. Access Mostly Uused Products by 50000+ Subscribers

4. ACCOUNT MANAGER


Question : Which class is used when a sensor is accessed?

 : Which class is used when a sensor is accessed?
1. SensorEventListener

2. SensorEvent

3. Access Mostly Uused Products by 50000+ Subscribers

4. Sensor


Question : Which of these is the incorrect explanation of the Toast class?

 : Which of these is the incorrect explanation of the Toast class?
1. Toast is a simple class for display, and cannot be set with a custom XML-defined layout

2. The display duration time of Toast can be chosen from 2 types, LENGTHJjDNG and LENGTH_SHORT.

3. Access Mostly Uused Products by 50000+ Subscribers

4. Since Toast automatically closes after display, a dismiss () method is not provided