Spring Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code = getmirror

Pass the Google Developers Certification Associate-Android-Developer Questions and answers with ExamsMirror

Practice at least 50% of the questions to maximize your chances of passing.
Exam Associate-Android-Developer Premium Access

View all detail and faqs for the Associate-Android-Developer exam


656 Students Passed

96% Average Score

93% Same Questions
Viewing page 3 out of 4 pages
Viewing questions 21-30 out of questions
Questions # 21:

What happens when you create a DAO method and annotate it with @Insert?

Example:

@Dao

interface MyDao {

@Insert(onConflict = OnConflictStrategy.REPLACE)

fun insertUsers(vararg users: User)

}

Options:

A.

Room generates an implementation that inserts all parameters into the database in a single transaction.

B.

Room modifies a set of entities, given as parameters, in the database. It uses a query that matches against the primary key of each entity.

C.

Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.

Questions # 22:

SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. All changes you make in an editor are batched, and not copied back to the original SharedPreferences until you call:

Options:

A.

commit()

B.

apply()

C.

commit() or apply()

Questions # 23:

For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:

android:title="@string/pref_notification_title" android:summary="@string/pref_notification_summary" android:defaultValue="@bool/pref_notification_default_value" app:iconSpaceReserved="false"/>

In our Fragment, we can dynamically get current notification preference value in this way:

Options:

A.

val isNotificationOn = PreferenceManager.getDefaultSharedPreferences (context).getBoolean(

context!!.getString(R.string.pref_notification_key), context!!.resources.getBoolean(R.bool.pref_notification_default_value)

)

B.

val isNotificationOn = PreferenceManager.getSharedPreferences (context).getBoolean(

context!!.getString(R.string.pref_notification_default_value), context!!.getString(R.string.pref_notification_key),

)

C.

val isNotificationOn = PreferenceManager.getSharedPreferences (context).getBoolean(

context!!.resources.getBoolean(R.bool.pref_notification_default_value), context!!.getString(R.string.pref_notification_key)

)

Questions # 24:

To run a debuggable build variant you must use a build variant that includes

Options:

A.

minifyEnabled false in the build configuration

B.

debuggable true or debuggable false in the build configuration

C.

debuggable true in the build configuration

Questions # 25:

What is a correct part of an Implicit Intent for sharing data implementation?

Options:

A.

val sendIntent = Intent(this, UploadService::class.java).apply { putExtra(Intent.EXTRA_TEXT, textMessage)

...

B.

val sendIntent = Intent().apply { type = Intent.ACTION_SEND;

...

C.

val sendIntent = Intent(this, UploadService::class.java).apply { data = Uri.parse(fileUrl)

...

D.

val sendIntent = Intent().apply { action = Intent.ACTION_SEND

...

Questions # 26:

Filter logcat messages. If in the filter menu, a filter option “Edit Filter Configuration”? means:

Options:

A.

Display the messages produced by the app code only (the default). Logcat filters the log messages using the PID of the active app.

B.

Apply no filters. Logcat displays all log messages from the device, regardless of which process you selected.

C.

Create or modify a custom filter. For example, you could create a filter to view log messages from two apps at the same time.

Questions # 27:

Interface for a callback to be invoked when a shared preference is changed. Interface is named:

Options:

A.

android.content.SyncStatusObserver

B.

android.content.SharedPreferences.Editor

C.

android.content.SharedPreferences.OnSharedPreferenceChangeListener

D.

android.content.SharedPreferences

Questions # 28:

About running a debuggable build variant. Usually, you can just select the default "debug" variant that's included in every Android Studio project (even though it's not visible in the build.gradle file). But if you define new build types that should be debuggable, you must add ‘debuggable true’ to the build type. Is that mostly true?

Options:

A.

Yes.

B.

No, if you define new build types that should be debuggable, you must add ‘debuggable false’

C.

No, the debug variant should be visible in the build.gradle file anyway.

Questions # 29:

By executing an allowMainThreadQueries() method to the room database builder

RoomDatabase.Builder, we can:

Options:

A.

set the database factory

B.

handle database first time creation

C.

handle database opening

D.

disable the main thread query check for Room

Questions # 30:

Question # 30

What is illustrated in the picture?

Options:

A.

Logcat window with filter settings

B.

Debugging native code using LLDB

C.

The Variables and Watches panes in the Debugger window

D.

The Breakpoints window lists all the current breakpoints and includes behavior settings for each

E.

Adding a watchpoint to a variable in memory

Viewing page 3 out of 4 pages
Viewing questions 21-30 out of questions
TOP CODES

TOP CODES

Top selling exam codes in the certification world, popular, in demand and updated to help you pass on the first try.