Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

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

When scheduling unique work, you must tell WorkManager what action to take when there is a conflict. You do this by passing an enum when enquing the work. For one-time work, you provide an ExistingWorkPolicy, which supports some options for handling the conflict. (Choose four.)

A.

REPLACE (existing work with the new work. This option cancels the existing work)

B.

KEEP (existing work and ignore the new work)

C.

APPEND (the new work to the end of the existing work. This policy will cause your new work to be chained to the existing work, running after the existing work finishes)

D.

APPEND_OR_REPLACE (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still runs)

E.

APPEND_OR_KEEP (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is CANCELLED or FAILED, the new work still not runs)

F.

APPEND_AND_RUN (functions similarly to APPEND, except that it is not dependent on prerequisite work status. If the existing work is PAUSED, the new work still runs)

G.

DESTROY (if any work exists, the new work will be ignored)

In application theme style, flag windowNoTitle () indicates:

A.

whether this window should have an Action Bar in place of the usual title bar.

B.

whether there should be no title on this window.

C.

that this window should not be displayed at all.

D.

whether this is a floating window.

E.

whether this Window is responsible for drawing the background for the system bars.

If content in a PagedList updates, the PagedListAdapter object receives:

A.

only one item from PagedList that contains the updated information.

B.

one or more items from PagedList that contains the updated information.

C.

a completely new PagedList that contains the updated information.

Choose the most correct statement.

A.

Android is a closed source, Linux-based software stack created for a wide array of devices and form factors.

B.

Android is a closed source, Windows-based software stack created for a wide array of devices and form factors.

C.

Android is an open source, Linux-based software stack created for a wide array of devices and form factors.

D.

Android is an open source software stack created for a highly limited array of devices and form factors.

For example, we have a file in our assets folder app/src/main/assets/sample_teas.json. To get an

InputStream for reading it, from out Context context, we can try doing this:

A.

InputStream input = context.getResources().openRawResource(R.raw.sample_teas);

B.

InputStream input = context.getAssets().open("sample_teas.json");

C.

InputStream input = context.getResources().getAssets().open ("sample_teas.json");

Working with Custom View. To define custom attributes, we can add resources to our project. It is customary to put these resources into a file:

A.

res/layout/attrs.xml

B.

res/values/attrs.xml

C.

res/raw/attrs.xml

D.

res/xml/attrs.xml

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

Example:

@Dao

public interface MyDao {

@Insert(onConflict = OnConflictStrategy.REPLACE)

public void insertUsers(User... users);

}

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.

A content label sometimes depends on information only available at runtime, or the meaning of a View might change over time. For example, a Play button might change to a Pause button during music playback. In these cases, to update the content label at the appropriate time, we can use:

A.

View#setContentDescription(int contentDescriptionResId)

B.

View#setContentLabel(int contentDescriptionResId)

C.

View#setContentDescription(CharSequence contentDescription)

D.

View#setContentLabel(CharSequence contentDescription)