Premium

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

Correct Answer : Get Lastest Questions and Answer :
Explanation: Starting another activity doesn't have to be one-way. You can also start another activity and receive a result back. To receive a result, call startActivityForResult() (instead of startActivity()).

For example, your app can start a camera app and receive the captured photo as a result. Or, you might start the People app in order for the user to select a contact and you'll receive the contact details as a result.

Of course, the activity that responds must be designed to return a result. When it does, it sends the result as another Intent object. Your activity receives it in the onActivityResult() callback.

Note: You can use explicit or implicit intents when you call startActivityForResult(). When starting one of your own activities to receive a result, you should use an explicit intent to ensure that you receive the expected result.




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

Correct Answer : Get Lastest Questions and Answer :
Explanation: INTENT RESOLUTION PROCESS
To start an Activity using an implicit Intent, the system checks three aspects
Intent Action
Intent Category
Intent Data (URI and Type)

Intent Resolution
When the system receives an implicit intent to start an activity, it searches for the best activity for the intent by comparing the intent to intent filters based on three aspects:

The intent action
The intent data (both URI and data type)
The intent category
The following sections describe how intents are matched to the appropriate component(s) in terms of how the intent filter is declared in an app's manifest file.




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

Correct Answer : Get Lastest Questions and Answer :
Explanation:


Related 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.


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


Question : Which of these is the incorrect explanation of the androiddebuggable attribute of the
AndroidManifest.xm tag?

 : Which of these is the incorrect explanation of the androiddebuggable attribute of the
1. If not set, it will be handled as "false".

2. It is necessary to set this to "true" in order to use Eclipse's breakpoint function.

3. Access Mostly Uused Products by 50000+ Subscribers

4. When releasing the application, deleting android:debuggable is recommended.


Question : Which of these is the correct description of file access?


 : Which of these is the correct description of file access?
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. Access Mostly Uused Products by 50000+ Subscribers

4. In order to access a file, the open FileStream method is provided in the Context class



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