Associate-Android-Developer Dumps To Pass Google Exam in 24 Hours - Exam-Killer [Q21-Q40]

Share

Associate-Android-Developer Dumps To Pass Google Exam in 24 Hours - Exam-Killer

Buy Latest Associate-Android-Developer Exam Q&A PDF - One Year Free Update


The benefit of obtaining the Google Associate Android Developer Certified Exam Certification

  • Associate Android Developer Certified exam test provide proven knowledge to use the tools to complete the task efficiently and cost-effectively than the other non-certified professionals lack in doing so.
  • Google Associate Android Developer Certified will be confident and stand different from others as their skills are more trained than non-certified professionals.
  • Google Associate Android Developer Certified Certifications provide opportunities to get a job easily in which they are interested in instead of wasting years and ending without getting any experience.
  • Google Associate Android Developer Certified Certification is distinguished among competitors. Google Associate Android Developer Certified certification can give them an edge at that time easily when candidates appear for an employment interview, employers are very fascinated to note one thing that differentiates the individual from all other candidates.
  • Google Associate Android Developer Certified certification provides practical experience to candidates from all the aspects to be a proficient worker in the organization.
  • Google Associate Android Developer Certified certification has more useful and relevant certifications that help them in setting career goals for themselves. Google Associate Android Developer Certified provides them with the correct career guidance that non-certified generally are unable to get.

 

NEW QUESTION 21
What is illustrated in the picture?

  • A. Debugging native code using LLDB
  • B. The Breakpoints window lists all the current breakpoints and includes behavior settings for each
  • C. Logcat window with filter settings
  • D. The Variables and Watches panes in the Debugger window
  • E. Adding a watchpoint to a variable in memory

Answer: D

 

NEW QUESTION 22
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)).do(typeText("Steve"))
    onView(withId(R.id.greet_button)).do(click())
    onView(withText("Hello Steve!")).compare(matches(isDisplayed()))
    }
  • C. @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()))
    }

Answer: C

 

NEW QUESTION 23
As an example. In an Activity we have our TimerViewModel object (extended ViewModel), named mTimerViewModel. mTimerViewModel.timer method returns a LiveData<Long> value. What can be a correct way to set an observer to change UI in case if data was changed?

  • A. mTimerViewModel!!.timer.value.toString().observe
    (Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })
  • B. mTimerViewModel!!.timer.observe
    (this, Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })
  • C. mTimerViewModel.observe
    (Observer { aLong -> callAnyChangeUIMethodHere(aLong!!) })

Answer: B

 

NEW QUESTION 24
SharedPreferences.Editor is an interface used for modifying values in a SharedPreferences object. To mark in the editor that a preference value should be removed, which will be done in the actual preferences once commit() or apply() is called, what method in SharedPreferences.Editor should we use?

  • A. delete(String key)
  • B. removeAll()
  • C. remove(String key)
  • D. clear()

Answer: D

Explanation:
clear() method marks in the editor to remove ALL values from the preferences. Once commit is called, the only remaining preferences will be any that you have defined in this editor.
And no delete and removeAll method exists in SharedPreferences.Editor

 

NEW QUESTION 25
By default, the notification's text content is truncated to fit one line. If you want your notification to be longer, for example, to create a larger text area, you can do it in this way:

  • A. NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setStyle(new NotificationCompat.BigTextStyle()
    .bigText("Much longer text that cannot fit one line..."))
    ...
  • B. NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setLongText("Much longer text that cannot fit one line..."))
    ...
  • C. NotificationCompat.Builder builder = new NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setTheme(android.R.style.Theme_LongText);
    ...

Answer: A

Explanation:
Reference:
https://developer.android.com/training/notify-user/build-notification

 

NEW QUESTION 26
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. 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)
  • B. REPLACE (existing work with the new work. This option cancels the existing work)
  • C. KEEP (existing work and ignore the new work)
  • D. 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)
  • E. APPEND_OR_DESTROY (if no any work exists, the new work will be ignored)
  • F. 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)
  • G. DESTROY (if any work exists, the new work will be ignored)
  • H. 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)

Answer: B,C,F,H

Explanation:
Working with WorkManager, from the 2018 Android Dev Summit WorkManager: Beyond the basics, from the 2019 Android Dev Summit Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en

 

NEW QUESTION 27
If you added to your build.gradle file a room.schemaLocation:
android {
defaultConfig {
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString
()]
}
}
}
}
Then, you build your app or module.
As a result you got a json file, with such path to it: app/schemas/your_app_package/db_package/DbClass/DB_VERSION.json What are the correct statements about this file? (Choose all that apply.)

  • A. Main JSONObject in this file usually should contain a number "formatVersion" and a JSONObject "database"
  • B. The JSONObject "database" in this file usually should contain such objects, like "entities", "views", "setupQueries", ets.
  • C. It's a file with Room-exported schema

Answer: A,B,C

Explanation:
Exported schema file example:
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "d90c93040756d2b94a178d5555555555",
"entities": [
{
"tableName": "tea_table",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER
PRIMARY KEY AUTOINCREMENT NOT NULL, `name` TEXT, `type` TEXT, `origin` TEXT,
`steep_times` INTEGER, `Description` TEXT, `ingredients` TEXT, `cafeinLevel` TEXT, `favorite` INTEGER)",
"fields": [
{
"fieldPath": "mId",
"columnName": "id",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "mName",
"columnName": "name",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mType",
"columnName": "type",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mOrigin",
"columnName": "origin",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mSteepTimeMs",
"columnName": "steep_times",
"affinity": "INTEGER",
"notNull": false
},
{
"fieldPath": "mDescription",
"columnName": "Description",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mIngredients",
"columnName": "ingredients",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mCaffeineLevel",
"columnName": "cafeinLevel",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "mFavorite",
"columnName": "favorite",
"affinity": "INTEGER",
"notNull": false
}
],
"primaryKey": {
"columnNames": [
"id"
],
"autoGenerate": true
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY
KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42,
'd90c93040756d2b94a178d5555555555')"
]
}
}

 

NEW QUESTION 28
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#setContentLabel(int contentDescriptionResId)
  • B. View#setContentDescription(CharSequence contentDescription)
  • C. View#setContentDescription(int contentDescriptionResId)
  • D. View#setContentLabel(CharSequence contentDescription)

Answer: B

Explanation:
Reference:
https://support.google.com/accessibility/android/answer/7158690?hl=en

 

NEW QUESTION 29
With our Context we can get SharedPreferences with a method, named: getSharedPreferences (String name, int mode). What value can we transfer in a "mode"parameter?

  • A. Value is either 0 or a combination of MODE_PRIVATE, MODE_WORLD_READABLE, D.
    MODE_WORLD_WRITEABLE, and MODE_MULTI_PROCESS
  • B. MODE_PRIVATE or MODE_PUBLIC
  • C. combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE

Answer: A

 

NEW QUESTION 30
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<SwitchPreference android:id="@+id/notification" android:key="@string/pref_notification_key" 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:

  • A. boolean isNotificationOn = PreferenceManager.getSharedPreferences(getContext ()).getBoolean( getContext().getString(R.string.pref_notification_default_value), getContext().getString(R.string.pref_notification_key) );
  • B. boolean isNotificationOn = PreferenceManager.getSharedPreferences(getContext ()).getBoolean( getContext().getResources().getBoolean(R.bool.pref_notification_default_value), getContext().getString(R.string.pref_notification_key) );
  • C. boolean isNotificationOn = PreferenceManager.getDefaultSharedPreferences(getContext ()).getBoolean( getContext().getString(R.string.pref_notification_key), getContext().getResources().getBoolean(R.bool.pref_notification_default_value) );

Answer: C

 

NEW QUESTION 31
The diagram below shows a basic form of the recommended architecture for apps that use Architecture Components. The architecture consists of a UI controller, a ViewModel that serves LiveData, a Repository, and a Room database. Drag modules to correct places.

Answer:

Explanation:

 

NEW QUESTION 32
An overridden method onCreateOptionsMenu in an Activity returns boolean value. What does this value mean?

  • A. You can return any value: the menu will be displayed anyway.
  • B. You must return false for the menu to be displayed; if you return true it will not be shown.
  • C. You must return true for the menu to be displayed; if you return false it will not be shown.

Answer: C

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/menus

 

NEW QUESTION 33
The Layout Inspector in Android Studio allows you to compare your app layout with design mockups, display a magnified or 3D view of your app, and examine details of its layout at runtime. When this is especially useful?

  • A. when your layout is built at runtime rather than entirely in XML and the layout is behaving unexpectedly.
  • B. when your layout is built entirely in XML rather than runtime and the layout is behaving expectedly.

Answer: A

 

NEW QUESTION 34
Filter logcat messages. If in the filter menu, a filter option "Show only selected application"? means:

  • A. Apply no filters. Logcat displays all log messages from the device, regardless of which process you selected.
  • B. Create or modify a custom filter. For example, you could create a filter to view log messages from two apps at the same time.
  • C. Display the messages produced by the app code only (the default). Logcat filters the log messages using the PID of the active app.

Answer: C

 

NEW QUESTION 35
RecyclerView is a subclass of ViewGroup and is a more resource-efficient way to display scrollable lists. Instead of creating a View for each item that may or may not be visible on the screen, RecyclerView:

  • A. creates a limited number of list items and reuses them for visible content.
  • B. creates a single list item and never reuses it
  • C. creates a single list item and reuses it for visible content.
  • D. creates an unlimited number of list items and never reuses them

Answer: A

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/layout/recyclerview

 

NEW QUESTION 36
"workManager" is an instance of WorkManager. Select correct demonstration of WorkRequest cancellation:

  • A. WorkRequest request = new OneTimeWorkRequest.Builder(FooWorker.class).build(); workManager.enqueue(request); LiveData<WorkInfo> status = workManager.getWorkInfoByIdLiveData(request.getId ()); status.observe(...);
  • B. WorkRequest request = new OneTimeWorkRequest.Builder(FooWorker.class).build(); workManager.enqueue(request); workManager.cancelWorkById(request.getId());
  • C. workManager.enqueue(new OneTimeWorkRequest.Builder(FooWorker.class).build());
  • D. WorkRequest request = new OneTimeWorkRequest.Builder(FooWorker.class).build(); workManager.enqueue(request); workManager.cancelWork(request);
  • E. WorkRequest request1 = new OneTimeWorkRequest.Builder(FooWorker.class).build(); WorkRequest request2 = new OneTimeWorkRequest.Builder(BarWorker.class).build (); WorkRequest request3 = new OneTimeWorkRequest.Builder(BazWorker.class).build (); workManager.beginWith(request1, request2).then(request3).enqueue();

Answer: B

Explanation:
Working with WorkManager, from the 2018 Android Dev Summit WorkManager: Beyond the basics, from the 2019 Android Dev Summit Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en

 

NEW QUESTION 37
If you are working with a Builder that creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period. What statement is correct?

  • A. The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval can be anything in relation to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
  • B. The repeat interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
  • C. The repeat interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be lower than or equal to PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
  • D. The repeat interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.

Answer: B

Explanation:
Working with WorkManager, from the 2018 Android Dev Summit
WorkManager: Beyond the basics, from the 2019 Android Dev Summit
Reference:
https://developer.android.com/reference/androidx/work/WorkManager?hl=en

 

NEW QUESTION 38
Enable debugging on your device: If you are using the emulator, this is enabled by default. But for a connected device, you need to

  • A. enable debugging in the device developer options.
  • B. enable transfer data from the device in usb connection options.
  • C. enable connection in bluetooth options.

Answer: A

 

NEW QUESTION 39
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<SwitchPreference android:id="@+id/notification" android:key="@string/pref_notification_key" 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:

  • A. val isNotificationOn = PreferenceManager.getSharedPreferences (context).getBoolean( context!!.resources.getBoolean(R.bool.pref_notification_default_value), context!!.getString(R.string.pref_notification_key) )
  • 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.getDefaultSharedPreferences (context).getBoolean( context!!.getString(R.string.pref_notification_key), context!!.resources.getBoolean(R.bool.pref_notification_default_value) )

Answer: C

 

NEW QUESTION 40
......

Download the Latest Associate-Android-Developer Dump - 2021 Associate-Android-Developer Exam Question Bank: https://www.exam-killer.com/Associate-Android-Developer-valid-questions.html