Associate-Android-Developer Associate Android Developer

Loading demo links...

Showing 4–6 of 10 questions

Question 4 (JAVA only)

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

Select all that apply, then click Submit answer.

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

  • KEEP (existing work and ignore the new work)

  • 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)

  • 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)

  • 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)

  • 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)

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

  • APPEND_OR_DESTROY (if no any work exists, the new work will be ignored)

Question 5 (KOTLIN only)

By adding a RoomDatabase.Callback to the room database builder RoomDatabase.Builder (method addCallback(RoomDatabase.Callback callback)), we can: (Choose two.)

Select all that apply, then click Submit answer.

  • set the database factory

  • handle database first time creation

  • handle database opening

  • disable the main thread query check for Room

Question 6 (KOTLIN only)

When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can then use the tools in the Debugger tab to identify the state of the app. With Evaluate Expression you can

Select an option, then click Submit answer.

  • examine the object tree for a variable; expand it in the Variables view

  • evaluate an expression at the current execution point

  • advance to the next line in the code (without entering a method)

  • advance to the first line inside a method call

  • advance to the next line outside the current method

  • continue running the app normally