Free Sales Ending Soon - 100% Valid Associate-Android-Developer Exam Dumps with 125 Questions [Q71-Q90]

Share

Free Sales Ending Soon - 100% Valid Associate-Android-Developer Exam Dumps with 125 Questions

Verified Associate-Android-Developer dumps Q&As on your Google Developers Exam Questions Certain Success!


Exam Prerequisites

There are no particular prerequisites for admission to the Google Associate Android Developer exam. Nevertheless, if the age of the candidate is 13 to 17 he/she may take the test with parental consent. Individuals aged 18 and up are eligible for this certification without extra requirements. Also, all applicants must be able to show proof of residency in a non-embargoed country on authorized identification. Google follows the embargoed countries list published by the US government. Moreover, to complete the exam, you should use the most recent version of Android Studio.

 

NEW QUESTION 71
What is a correct part of an Implicit Intent for sharing data implementation?

  • A. Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND);
  • B. Intent sendIntent = new Intent(); sendIntent.setType(Intent.ACTION_SEND);
  • C. Intent sendIntent = new Intent(this, UploadService.class) sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage);
  • D. Intent sendIntent = new Intent(this, UploadService.class) sendIntent.setData(Uri.parse(fileUrl));

Answer: A

Explanation:
Create the text message with a string
Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, textMessage); sendIntent.setType("text/plain"); Reference:
https://developer.android.com/guide/components/fundamentals

 

NEW QUESTION 72
In application theme style, flag windowDrawsSystemBarBackgrounds (<item name="android:windowDrawsSystemBarBackgrounds">) indicates:

  • A. whether this Window is responsible for drawing the background for the system bars.
  • B. whether this window should have an Action Bar in place of the usual title bar.
  • C. that this window should not be displayed at all.
  • D. whether there should be no title on this window.
  • E. whether this is a floating window.

Answer: A

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

 

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

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

Answer: A

 

NEW QUESTION 74
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.getSharedPreferences(context).getBoolean( context!!.resources.getBoolean(R.bool.pref_default_sort_value), context!!.getString(R.string.pref_sort_key) )
  • B. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.getString(R.string.pref_default_sort_value) )
  • C. val sortBy = PreferenceManager.getSharedPreferences(context).getString( context!!.getString(R.string.pref_default_sort_value), context!!.getString(R.string.pref_sort_key), )
  • D. val sortBy = PreferenceManager.getDefaultSharedPreferences(context).getString( context!!.getString(R.string.pref_sort_key), context!!.resources.getBoolean(R.bool.pref_default_sort_value) )

Answer: B

 

NEW QUESTION 75
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 do this:

  • A. val input = context!!.assets.open("sample_teas.json")
  • B. val input = context!!.resources.openRawResource(R.raw.sample_teas)
  • C. val input = context!!.resources.assets.open("sample_teas.json")

Answer: A

 

NEW QUESTION 76
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...")
    .setLongText("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...")
    .setTheme(android.R.style.Theme_LongText);
    ...
  • C. 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..."))
    ...

Answer: C

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

 

NEW QUESTION 77
About running a debuggable build variant. Usually, you can just select the default "debug" variant that's included in every Android Studio project (even though it's not visible in the build.gradle file). But if you define new build types that should be debuggable, you must add 'debuggable true' to the build type. Is that mostly true?

  • A. No, the debug variant should be visible in the build.gradle file anyway.
  • B. Yes.
  • C. No, if you define new build types that should be debuggable, you must add 'debuggable false'

Answer: B

 

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

Answer: C

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

 

NEW QUESTION 79
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 80
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_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)
  • 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_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. REPLACE (existing work with the new work. This option cancels the existing work)
  • F. DESTROY (if any work exists, the new work will be ignored)
  • G. APPEND_OR_DESTROY (if no any work exists, the new work will be ignored)
  • H. 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)

Answer: A,B,C,E

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 81
In our TeaViewModel class, that extends ViewModel, we have such prorerty:
val tea: LiveData<Tea>
An observer in our Activity (type of mViewModel variable in example is TeaViewModel) is set in this way:
mViewModel!!.tea.observe(this, Observer { tea: Tea? -> displayTea(tea) }) What will be a correct displayTea method definition?

  • A. private fun displayTea()
  • B. private fun displayTea(tea: LiveData?<T>)
  • C. private fun displayTea(tea: Tea?)
  • D. private fun displayTea(tea: LiveData?<Tea>)

Answer: C

 

NEW QUESTION 82
What statements about InputStreamReader (java.io.InputStreamReader) are correct? (Choose two.)

  • A. Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte-input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
  • B. An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes them into characters using a specified charset. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
  • C. An InputStreamReader is a bridge from character streams to byte streams: It reads characters using a specified charset and encodes them into bytes. The charset that it uses may be specified by name or may be given explicitly, or the platform's default charset may be accepted.
  • D. No any invocation of one of an InputStreamReader's read() methods can cause some bytes to be read from the underlying byte-input stream.

Answer: A,B

 

NEW QUESTION 83
When your code execution reaches the breakpoint, Android Studio pauses execution of your app. 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 outside the current method
  • E. advance to the first line inside a method call
  • F. advance to the next line in the code (without entering a method)

Answer: F

 

NEW QUESTION 84
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 PeriodicWorkRequest.MIN_PERIODIC_INTERVAL_MILLIS and the flex interval must be greater than PeriodicWorkRequest.MIN_PERIODIC_FLEX_MILLIS.
  • B. 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.
  • C. 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.
  • D. 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.

Answer: C

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 85
If you want get a debuggable APK that people can install without adb, in Android Studio you can:

  • A. Select your debug variant and click Analyze APK.
  • B. Click the Run button from toolbar
  • C. Select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).

Answer: C

Explanation:
The Run button builds an APK with testOnly="true", which means the APK can only be installed via adb (which Android Studio uses). If you want a debuggable APK that people can install without adb, select your debug variant and click Build Bundle(s) / APK(s) > Build APK(s).
Reference:
https://developer.android.com/studio/run

 

NEW QUESTION 86
For example, we have a BufferedReader reader, associated with the json file through InputStreamReader. To get a file data we can do this:

  • A. var line: String? try {
    while (reader.readLine().also { line = it } != null) { builder.append(line)
    }
    val json = JSONObject(builder.toString())
    return json
    } catch (exception: RuntimeException) {
    exception.printStackTrace()
    } catch (exception: ArrayIndexOutOfBoundsException) {
    exception.printStackTrace()
    }
  • B. var line: String? try {
    while (reader.readLine().also { line = it } != null) { builder.append(line)
    }
    val json = JSONObject(builder.toString())
    return json
    } catch (exception: IOException) {
    exception.printStackTrace()
    } catch (exception: JSONException) {
    exception.printStackTrace()
    }
  • C. var line: JSONObject ? try {
    while (reader.readJSONObject ().also { line = it } != null) {
    builder.append(line)
    }
    val json = JSONObject(builder.toString())
    return json
    } catch (exception: IOException) {
    exception.printStackTrace()
    } catch (exception: JSONException) {
    exception.printStackTrace()
    }

Answer: B

 

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

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

Answer: A,D

 

NEW QUESTION 88
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 fun onCreateOptionsMenu(menu: Menu): Boolean { menuInflater.inflate(R.menu.menu_main, menu) return true
    }
  • B. override fun onOptionsItemSelected(item: MenuItem): Boolean {
    menuInflater.inflate(R.menu.menu_main, menu) return super.onOptionsItemSelected(item)
    }
  • C. override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.menu.menu_main)
    }

Answer: A

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

 

NEW QUESTION 89
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 Into 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. advance to the first line inside a method call
  • D. examine the object tree for a variable, expand it in the Variables view. If the Variables view is not visible
  • E. continue running the app normally
  • F. advance to the next line outside the current method

Answer: C

 

NEW QUESTION 90
......


Google Associate Android Developer Certified Professional salary

The average salary of a Google Associate Android Developer Certified Expert in different regions is as follows:

  • Europe: 130,000 EURO
  • United State: 120,000 USD
  • England: 135,500 POUNDS
  • India: 20,00,000 INR

 

Associate-Android-Developer Exam Dumps - 100% Marks In Associate-Android-Developer Exam: https://www.braindumpspass.com/Google/Associate-Android-Developer-practice-exam-dumps.html