Weekend Sale Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Google Developers Certification Associate-Android-Developer Passing Score

Google Developers Certification - Associate Android Developer (Kotlin and Java Exam) Questions and Answers

Question 9

What is demonstrated by the code below?

// RawDao.java

@Dao

interface RawDao {

@RawQuery

User getUserViaQuery(SupportSQLiteQuery query);

}

// Usage of RawDao

...

SimpleSQLiteQuery query =

new SimpleSQLiteQuery("SELECT * FROM UserWHERE id = ? LIMIT 1",

new Object[]{userId});

User user = rawDao.getUserViaQuery(query);

...

Options:

A.

A method in a Dao annotated class as a raw query method where you can pass the query as a

SupportSQLiteQuery.

B.

A method in a Dao annotated class as a query method.

C.

A method in a RoomDatabase class as a query method.

Question 10

If you want get a debuggable APK that people can install without adb, in Android Studio you can:

Options:

A.

Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).

B.

Click the Run button from toolbar

C.

Select your debug variant and click Analyze APK.

Question 11

In a class PreferenceFragmentCompat. What method is called during onCreate(Bundle) to supply the preferences for this fragment. And where subclasses are expected to call setPreferenceScreen (PreferenceScreen) either directly or via helper methods such as addPreferencesFromResource (int)?

Options:

A.

onCreateLayoutManager

B.

onCreatePreferences

C.

onCreateRecyclerView

D.

onCreateView

Question 12

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

...