Best Preparations of Associate-Android-Developer Exam 2021 Google Developers Unlimited 125 Questions [Q55-Q80]

Share

Best Preparations of Associate-Android-Developer Exam 2021 Google Developers Unlimited 125 Questions

Focus on Associate-Android-Developer All-in-One Exam Guide For Quick Preparation.


Testing

  • Ability to write local JUnit tests that are useful.
  • Understanding the basics of testing in depth.
  • Recognizing the Espresso UI test framework.
  • Knowing how to write useful automated Android tests.

 

NEW QUESTION 55
A class that you create for managing multiple data sources. In addition to a Room database, this class could manage remote data sources such as a web server. It is about:

  • A. Activity/Fragment
  • B. Repository
  • C. Room database
  • D. ViewModel

Answer: B

 

NEW QUESTION 56
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 removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
  • 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 generates an implementation that inserts all parameters into the database in a single transaction.

Answer: C

 

NEW QUESTION 57
Custom views and directional controller clicks. On most devices, clicking a view using a directional controller sends (to the view currently in focus) a KeyEvent with:

  • A. KEYCODE_BUTTON_START
  • B. KEYCODE_DPAD_CENTER
  • C. KEYCODE_CALL
  • D. KEYCODE_BUTTON_SELECT

Answer: B

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/accessibility/custom-views

 

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

  • A. set the database factory
  • B. handle database first time creation
  • C. disable the main thread query check for Room
  • D. handle database opening

Answer: B,D

 

NEW QUESTION 59
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. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setStyle(NotificationCompat.BigTextStyle()
    .bigText("Much longer text that cannot fit one line..."))
    ...
  • B. var builder = NotificationCompat.Builder(this, CHANNEL_ID)
    .setContentText("Much longer text that cannot fit one line...")
    .setLongText("Much longer text that cannot fit one line..."))
    ...
  • C. var builder = 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 60
Custom views and directional controller clicks. In general, you should send an AccessibilityEvent whenever the content of your custom view changes. For example, if a text value was changed in your custom view, you should emit an event of this type:

  • A. TYPE_WINDOWS_CHANGED
  • B. TYPE_WINDOWS_CHANGED
  • C. TYPE_VIEW_TEXT_CHANGED
  • D. TYPE_VIEW_CONTEXT_CLICKED

Answer: C

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/accessibility/custom-views

 

NEW QUESTION 61
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. You can

  • A. advance to the next line in the code (without entering a method)
  • B. evaluate an expression at the current execution point
  • C. continue running the app normally
  • D. examine the object tree for a variable; expand it in the Variables view. If the Variables view is not visible
  • E. advance to the next line outside the current method
  • F. advance to the first line inside a method call

Answer: E

 

NEW QUESTION 62
Which build options in the Build menu to choose to delete all intermediate/cached build files.

  • A. Clean Project
  • B. Make Module
  • C. Generate Signed Bundle / APK
  • D. Rebuild Project
  • E. Make Project

Answer: A

Explanation:
Reference:
https://developer.android.com/studio/run

 

NEW QUESTION 63
What method should we use with Notification.Builder to supply a PendingIntent to be sent when the notification is clicked?

  • A. setContentIntent
  • B. setContentInfo
  • C. setDeleteIntent

Answer: A

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

 

NEW QUESTION 64
To build a debug APK, you can open a command line and navigate to the root of your project directory. To initiate a debug build, invoke the assembleDebug task:
gradlew assembleDebug
This creates an APK named [module_name]-debug.apk in [project_name]/[module_name]/build/outputs/apk/ Select correct statements about generated file. (Choose all that apply.)

  • A. The file is already signed with the debug key
  • B. You can immediately install this file on a device.
  • C. The file is already aligned with zipalign

Answer: A,B,C

Explanation:
Reference:
https://developer.android.com/studio/run

 

NEW QUESTION 65
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 single list item and reuses it for visible content.
  • B. creates a single list item and never reuses it
  • C. creates an unlimited number of list items and never reuses them
  • D. creates a limited number of list items and reuses them for visible content.

Answer: D

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

 

NEW QUESTION 66
For example, our preferences.xml file was added by addPreferencesFromResource (R.xml.preferences). Our preferences.xml file contains such item:
<ListPreference android:id="@+id/order_by" android:key="@string/pref_sort_key" android:title="@string/pref_sort_title" android:summary="@string/pref_sort_summary" android:dialogTitle="@string/pref_sort_dialog_title" android:entries="@array/sort_oder" android:entryValues="@array/sort_oder_value" android:defaultValue="@string/pref_default_sort_value" app:iconSpaceReserved="false" /> In our Fragment, we can dynamically get current notification preference value in this way:

  • A. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.getString(R.string.pref_default_sort_value) )
  • B. val sortBy = PreferenceManager.getSharedPreferences(context).getBoolean( context!!.resources.getBoolean(R.bool.pref_default_sort_value), context!!.getString(R.string.pref_sort_key) )
  • C. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.resources.getBoolean(R.bool.pref_default_sort_value) )
  • D. val sortBy = PreferenceManager.getSharedPreferences(context).getString( context!!.getString(R.string.pref_default_sort_value), context!!.getString(R.string.pref_sort_key), )

Answer: A

 

NEW QUESTION 67
To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:

  • A. app/java/androidTest
  • B. app/androidTest/java
  • C. app/src/androidTest/java

Answer: C

 

NEW QUESTION 68
In general, you should send an AccessibilityEvent whenever the content of your custom view changes. For example, if you are implementing a custom slider bar that allows a user to select a numeric value by pressing the left or right arrows, your custom view should emit an event of type TYPE_VIEW_TEXT_CHANGED whenever the slider value changes. Which one of the following sample codes demonstrates the use of the sendAccessibilityEvent() method to report this event.

  • A. override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean { return when(keyCode) { KeyEvent.KEYCODE_ENTER -> { currentValue-- sendAccessibilityEvent (AccessibilityEvent.TYPE_VIEW_CONTEXT_CLICKED) true
    }
    ...
    }
    }
  • B. override fun dispatchPopulateAccessibilityEvent(event: AccessibilityEvent): Boolean { return super.dispatchPopulateAccessibilityEvent(event).let { completed -> if (text?.isNotEmpty() == true) { event.text.add(text) true
    } else {
    completed
    }
    }
    }
  • C. override fun onKeyUp(keyCode: Int, event: KeyEvent): Boolean { return when(keyCode) { KeyEvent.KEYCODE_DPAD_LEFT -> { currentValue-- sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_TEXT_CHANGED) true
    }
    ...
    }
    }

Answer: C

 

NEW QUESTION 69
In application theme style, flag windowActionBar (<item name="windowActionBar">) indicates:

  • A. whether the given application component is available to other applications.
  • B. whether this window should have an Action Bar in place of the usual title bar.
  • C. whether this window's Action Bar should overlay application content.
  • D. whether action modes should overlay window content when there is not reserved space for their UI (such as an Action Bar).

Answer: B

Explanation:
Reference:
https://developer.android.com/guide/topics/ui/look-and-feel/themes https://developer.android.com/reference/android/R.styleable.html

 

NEW QUESTION 70
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 that ListView to find a UI element with the text property Apps.
What is the correct sample?

  • A. val appItem: UiObject = device.findObject( UiSelector().className("android.widget.ListView")
    .instance(0)
    .childSelector(
    UiSelector().text("Apps")
    )
    )
  • B. val appItem: UiObject = device.findObject( UiSelector().className(ListView.class)
    .instance(1)
    .childSelector(
    UiSelector().text("Apps")
    )
    )
  • C. val appItem: UiObject = device.findObject( UiSelector().className("android.widget.ListView")
    .instance(
    UiSelector().text("Apps")
    )
    )

Answer: A

 

NEW QUESTION 71
What public methods are there in android.widget.Toast.Callback? (Choose two.)

  • A. onDismissed()
  • B. onToastShown()
  • C. onToastHidden()
  • D. onShown()
  • E. onToastCancelled()

Answer: B,C

 

NEW QUESTION 72
The Log class allows you to create log messages that appear in logcat. Generally, you could use the following log methods: (Choose five.)

  • A. Log.w(String, String) (warning)
  • B. Log.i(String, String) (information)
  • C. Log.q(String, String) (questions)
  • D. Log.v(String, String) (verbose)
  • E. Log.e(String, String) (error)
  • F. Log.a(String, String) (all outputs)
  • G. Log.d(String, String) (debug)

Answer: A,B,D,E,G

 

NEW QUESTION 73
The easiest way of adding menu items (to specify the options menu for an activity) is inflating an XML file into the Menu via MenuInflater. With menu_main.xml we can do it in this way:

  • A. @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    getMenuInflater().inflate(R.menu.menu_main, menu); return super.onOptionsItemSelected(item);
    }
  • B. @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.menu.menu_main);
    }
  • C. @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
    }

Answer: C

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

 

NEW QUESTION 74
When using an ImageView, ImageButton, CheckBox, or other View that conveys information graphically. What attribute to use to provide a content label for that View?

  • A. android:hint
  • B. android:contentDescription
  • C. android:labelFor

Answer: B

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

 

NEW QUESTION 75
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. combination of MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE
  • C. MODE_PRIVATE or MODE_PUBLIC

Answer: A

 

NEW QUESTION 76
Each time your test invokes onView(), Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met: (Choose three.)

  • A. All developer-defined idling res
  • B. The message queue is empty.
  • C. There are some instances of AsyncTask currently executing a task.
  • D. Some developer-defined idling resources are not idle.
  • E. The message queue is not empty.
  • F. There are no instances of AsyncTask currently executing a task.

Answer: A,B,F

 

NEW QUESTION 77
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.getDefaultSharedPreferences(getContext ()).getBoolean( getContext().getString(R.string.pref_notification_key), getContext().getResources().getBoolean(R.bool.pref_notification_default_value) );
  • 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.getSharedPreferences(getContext ()).getBoolean( getContext().getString(R.string.pref_notification_default_value), getContext().getString(R.string.pref_notification_key) );

Answer: A

 

NEW QUESTION 78
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 Step Over you can

  • A. evaluate an expression at the current execution point
  • B. examine the object tree for a variable; expand it in the Variables view.
  • C. continue running the app normally
  • D. advance to the next line in the code (without entering a method)
  • E. advance to the first line inside a method call
  • F. advance to the next line outside the current method

Answer: D

 

NEW QUESTION 79
What happens when you create a DAO method and annotate it with @Insert?
Example:
@Dao
interface MyDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertUsers(vararg users: User)
}

  • A. Room removes a set of entities, given as parameters, from the database. It uses the primary keys to find the entities to delete.
  • 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 generates an implementation that inserts all parameters into the database in a single transaction.

Answer: C

 

NEW QUESTION 80
......


What is the duration, language, and format of the Google Associate Android Developer Certified Exam

  • Length of Examination: 120 minutes
  • Language: English
  • Number of Questions: 50-60
  • Passing score: 80%
  • Format: Multiple choices, multiple select

How to Prepare for Google Associate Android Developer Certified Exam

Preparation Guide for Google Associate Android Developer Certified Exam

Introduction

Google has designed a track for IT professionals to endorse as a cloud DevOps Engineer on the GCP platform. This accreditation program gives Google cloud professionals a way to endorse their skills. The evaluation relies on a meticulous exam using the industry-standard methodology to conclude whether or not an aspirant meets Google’s proficiency standards.

According to Google, Associate Android Developer Certified exam test facilitates organizations to influence android application development. By leveraging the experience of the android studio for the development of the applications that’s why the latest version of Android Studio will be used in this certification.

Certification is evidence of your skills, expertise in those areas in which you like to work. If a candidate wants to work as Google Associate Android Developer Certified and prove his knowledge, certification is offered by Google. This Google Associate Android Developer Certified Certification helps a candidate to validates his skills in Google Associate Android Developer Certified Technology.

In this guide, we will cover the Google Associate Android Developer Certified practice exams, Google Associate Android Developer Certified Professionals salary, and all aspects of the Google Associate Android Developer Certification.

 

Guaranteed Success with Associate-Android-Developer Dumps: https://www.actual4dump.com/Google/Associate-Android-Developer-actualtests-dumps.html