Premium

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



Question : Which is the permission added to the Android manifest file in order to access GPS?

 : Which is the permission added to the Android manifest file in order to access GPS?
1. ACCESS_FINE_LOCATION

2. ACCESS_COARSE_LOCATION

3. Access Mostly Uused Products by 50000+ Subscribers

4. ACCESS MOCK LOCATION

Correct Answer : Get Lastest Questions and Answer :
Explanation: String ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded.
String ACCESS_COARSE_LOCATION Allows an app to access approximate location.
String ACCESS_FINE_LOCATION Allows an app to access precise location.
String ACCESS_LOCATION_EXTRA_COMMANDS Allows an application to access extra location provider commands.
String ACCESS_NETWORK_STATE Allows applications to access information about networks.
String ACCESS_NOTIFICATION_POLICY Marker permission for applications that wish to access notification policy.
String ACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks.




Question : Which of these is the incorrect explanation of the adb command?

 : Which of these is the incorrect explanation of the adb command?
1. The "adb start-server" command starts the adb server.

2. The "adb devices" command lists connected handsets and emulators.

3. Access Mostly Uused Products by 50000+ Subscribers

4. You install an apk with the "adb install" command

Correct Answer : Get Lastest Questions and Answer :
Explanation: The Android Debug Bridge (adb) provides a Unix shell that you can use to run a variety of commands on an emulator or connected device. The command binaries are stored in the file system of the emulator or device, at /system/bin/...


 : Which of these is the incorrect explanation of the adb command?








Question : The following code is a part of an Activity class to create a dialog. Which is the Activity class method used to display this dialog?

01 : @Override
02 : protected Dialog onCreateDialog(int id) {
03 : return new AlertDialog.Builder(this).setMessage("message").create();
04: }


 : The following code is a part of an Activity class to create a dialog. Which is the Activity class method used to display this dialog?
1. void createDialog();

2. void createDialogfint id);

3. Access Mostly Uused Products by 50000+ Subscribers

4. void showDialog(int id);

Correct Answer : Get Lastest Questions and Answer :
Explanation: ublic final void showDialog (int id) Added in API level 1

This method was deprecated in API level 13. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package.

Simple version of showDialog(int, Bundle) that does not take any arguments. Simply calls showDialog(int, Bundle) with null arguments.
Why

A fragment that displays a dialog window, floating on top of its activity's window. This fragment contains a Dialog object, which it displays as appropriate based on the fragment's state. Control of the dialog (deciding when to show, hide, dismiss it) should be done through the API here, not with direct calls on the dialog.



Related Questions


Question : Which of the following is not true about using a WebView in your application?

 : Which of the following is not true about using a WebView in your application?
1. You can retrieve WebSettings with getSettings(), then enable/disable JavaScript

2. You need to add permission "android.permission.ACCESS_NETWORK_STATE"

3. Access Mostly Uused Products by 50000+ Subscribers

4. You use loadData to load HTML


Question : Which of the following is NOT true about class AsyncTask?

 : Which of the following is NOT true about class AsyncTask?
1. It must be used by sub-classing it.

2. It must be created on the UI thread.

3. Access Mostly Uused Products by 50000+ Subscribers

4. It uses three generic types.


Question : What does the following line of code do?
Toast toast = Toast.makeText(this,"Android ATC", Toast.LENGTH_LONG);
toast.setGravity(Gravity.TOP|Gravity.RIGH, 0, 0);

 : What does the following line of code do?
1. The toast will have it UI components place on the top-right corner.

2. The toast will appear on the top-right corner.

3. Access Mostly Uused Products by 50000+ Subscribers

4. The toast will appear at the center of the screen at position (0,0), but aligned to the top-right corner.


Question : Which of the following is NOT true about a content provider?

 : Which of the following is NOT true about a content provider?
1. It manages access to structured data.

2. It cannot be used from inside an Activity.

3. Access Mostly Uused Products by 50000+ Subscribers

4. To access data in it, method getContentResolver() of the application's Context is used.


Question : Consider the following code snippet:
String[] result_columns = new String[] {KEY_ID, COL1, COL2};
Cursor allRows = myDatabase.query(true, DATABASE_TABLE, result_columns,
null, null, null, null, null, null);
Which of the following prints out the values of COL1 column correctly if the result is not empty?

 : Consider the following code snippet:
1. if (cursor.moveToFirst()) {
do {
System.out.println(cursor.getString(1));
} while (cursor.moveToNext());
}

2. do {
System.out.println(cursor.getString(0));
} while (cursor.moveToNext());

3. Access Mostly Uused Products by 50000+ Subscribers
do {
System.out.println(cursor.getString(0));
} while (cursor.moveToNext()); }

4. if (cursor != null) {
do {
System.out.println(cursor.getString(1));
} while (!cursor.isNull());
}


Question : Which is the incorrect explanation of an Activity?

 : Which is the incorrect explanation of an Activity?
1. If another Activity is instantiated when the Activity is executed, onPause() will be executed.

2. When the Activity is displayed in the foreground, onResume() will be executed.

3. Access Mostly Uused Products by 50000+ Subscribers

4. When the Activity returns from an onPause(), it sometimes can execute from onCreate().