LiveData.postValue() and LiveData.setValue() methods have some differences. So if you have a following code executed in the main thread: liveData.postValue(“a”); liveData.setValue(“b”); What will be the correct statement? A. The value “b” would be set at first and later the main…

The following code snippet shows an example of an Espresso test: A. @Rule fun greeterSaysHello() { onView(withId(R.id.name_field)).do(typeText(“Steve”)) onView(withId(R.id.greet_button)).do(click()) onView(withText(“Hello Steve!”)).check(matches(isDisplayed())) } B. @Test fun greeterSaysHello() { onView(withId(R.id.name_field)).perform(typeText(“Steve”)) onView(withId(R.id.greet_button)).perform(click()) onView(withText(“Hello Steve!”)).check(matches(isDisplayed())) } C. @Test fun greeterSaysHello() { onView(withId(R.id.name_field)).do(typeText(“Steve”)) onView(withId(R.id.greet_button)).do(click()) onView(withText(“Hello Steve!”)).compare(matches(isDisplayed()))…

Android Tests. You can use the childSelector() method to nest multiple UiSelector instances. For example, the following code example shows how your test might specify a search to find the first ListView in the currently displayed UI, then search within…

Select correct demonstration of WorkRequest cancellation. A. workManager.enqueue(OneTimeWorkRequest.Builder(FooWorker::class.java).build()) B. val request: WorkRequest = OneTimeWorkRequest.Builder(FooWorker::class.java).build() workManager.enqueue(request) val status = workManager.getWorkInfoByIdLiveData(request.id) status.observe(…) C. val request: WorkRequest = OneTimeWorkRequest.Builder(FooWorker::class.java).build() workManager.enqueue(request) workManager.cancelWorkById (request.id) D. val request1: WorkRequest = OneTimeWorkRequest.Builder(FooWorker::class.java).build() val request2: WorkRequest = OneTimeWorkRequest.Builder…