Premium

Associate Android Developer Certification Questions and Answer (Dumps and Practice 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

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

Correct Answer : Get Lastest Questions and Answer :
Explanation:




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.





Question : Which of these is the correct method to persist SharedPreferences?

 : Which of these is the correct method to persist SharedPreferences?
1. XML file

2. SQLite

3. Access Mostly Uused Products by 50000+ Subscribers

4. Java object

Correct Answer : Get Lastest Questions and Answer :
Explanation: Although you can instantiate new Preference objects at runtime, you should define your list of settings in XML with a hierarchy of Preference objects. Using an XML file to define your collection of settings is preferred because the file provides an easy-to-read structure that's simple to update. Also, your app's settings are generally pre-determined, although you can still modify the collection at runtime.

Each Preference subclass can be declared with an XML element that matches the class name, such as .

You must save the XML file in the res/xml/ directory. Although you can name the file anything you want, it's traditionally named preferences.xml. You usually need only one file, because branches in the hierarchy (that open their own list of settings) are declared using nested instances of PreferenceScreen.

Note: If you want to create a multi-pane layout for your settings, then you need separate XML files for each fragment.

The root node for the XML file must be a element. Within this element is where you add each Preference. Each child you add within the element appears as a single item in the list of settings.


Related Questions


Question : Which of these URI schemes is not supported by Android?

 : Which of these URI schemes is not supported by Android?
1. android://

2. content://

3. Access Mostly Uused Products by 50000+ Subscribers

4. market://search?



Question : Which function is not provided by the Android Development Tools Plugin?

 : Which function is not provided by the Android Development Tools Plugin?
1. Creating an Android project

2. Creating supporting resource files

3. Access Mostly Uused Products by 50000+ Subscribers

4. Supporting creation of a View


Question : The following program uses an Intent to open a Web page designated by a Web browser. Which is
the correct code that goes into (1)?

Intent intent = new Intent (" (1) " , Uri.parse("http://www.HadoopExam.com/logo.jpg"));
startActivity(intent);


 : The following program uses an Intent to open a Web page designated by a Web browser. Which is
1. android.intent.VIEW

2. android.intent.action.VIEW

3. Access Mostly Uused Products by 50000+ Subscribers

4. androidJntent.action.View


Question : Which code acquires a MediaPlayer class instance?

 : Which code acquires a MediaPlayer class instance?
1. MediaPlayer.create(this, R.raw.music);

2. newMediaPlayer(this, R.raw.music);

3. Access Mostly Uused Products by 50000+ Subscribers

4. MediaPlayer.newInstancefthis, R.raw.music),


Question : Which of the following is not a ContentProvider provided natively by Android?
 : Which of the following is not a ContentProvider provided natively by Android?
1. The contacts list

2. The telephone log

3. Access Mostly Uused Products by 50000+ Subscribers

4. The application list


Question : When creating a file using android.content.Context.openFileOutput("test.txt", ), where is the file created?

 : When creating a file using android.content.Context.openFileOutput(
1. /data/app//files

2. /data/data//files

3. Access Mostly Uused Products by 50000+ Subscribers

4. /system/data//files