Premium

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



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.

Correct Answer : Get Lastest Questions and Answer :
Explanation:




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());
}

Correct Answer : Get Lastest Questions and Answer :
Explanation:




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().

Correct Answer : Get Lastest Questions and Answer :
Explanation: The Activity class defines the following call backs i.e. events. You don't need to implement all the callbacks methods. However, it's important that you understand each one and implement those that ensure your app behaves the way users expect.

Callback Description
onCreate() This is the first callback and called when the activity is first created.
onStart() This callback is called when the activity becomes visible to the user.
onResume() This is called when the user starts interacting with the application.
onPause() The paused activity does not receive user input and cannot execute any code and called when the current activity is being paused and the previous activity is being resumed.
onStop() This callback is called when the activity is no longer visible.
onDestroy() This callback is called before the activity is destroyed by the system.
onRestart() This callback is called when the activity restarts after stopping it.


Related Questions


Question : What does the following code achieve?

Intent intent = new Intent(FirstActivity.this, SecondActivity.class);
startActivityForResult(intent);

 : What does the following code achieve?
1. Starts a browser activity

2. Starts a sub-activity

3. Starts an activity service

4. Sends results to another activity.


Question : When using an implicit intent, what process does the system use to know what to do with it?

 : When using an implicit intent, what process does the system use to know what to do with it?
1. Intent resolution

2. Intent declaration

3. Intent overloading

4. Intent transition


Question : Which of the following is NOT true about the MenuItem interface?

 : Which of the following is NOT true about the MenuItem interface?
1. The MenuItem instance will be returned by the Menu class add(...) method.

2. MenuItem can decide the Intent issued when clicking menu components.

3. MenuItem can display either an icon or text.

4. MenuItem can set a checkbox


Question : Which of the following is correct about XML layout files?

 : Which of the following is correct about XML layout files?
1. In order to display a Ul defined in the XML layout file "main.xml", call the setContentView method of theActivity with the parameter string "main.xml".

2. There is no distinction between implementation of the layout definition by code, or by XML layout file.

3. In an Eclipse project using the ADT plugin, the XML layout file is found in the /res/layout directory.

4. Layout information written in the XML layout file will be converted into code by the Android platform whenthe screen is displayed.


Question : The DalvikVM core libraries are a subset of which of the following?

 : The DalvikVM core libraries are a subset of which of the following?
1. Java ME

2. Java SE

3. Java EE

4. JAX-WS


Question : Which of the following is correct about file access in the Android system?

 : Which of the following is correct about file access in the Android system?
1. Generally, files are handled as dedicated resources per each application.

2. Files created by an application can be directly accessed by any application.

3. The content of file created by application cannot be accessed by any other application.

4. You can only access a file from within an Activity.