new tesdfaz\sdfxt document

Download New Tesdfaz\sdfxt Document

If you can't read please download the document

Upload: milos-ristic

Post on 24-Nov-2015

96 views

Category:

Documents


0 download

DESCRIPTION

asdfadsf

TRANSCRIPT

ScenarioYou have submitted an updated version of an application you have published to the Android market. However, you are getting reports that when people try to install the update it is installed as a new application instead of as an update.Based on the scenario above, what is the cause of this problem?Choice 1 You did not include the ALLOW_UPDATE permission in AndroidManifest.xml file.Choice 2 A different certificate was used to sign the update .apk file.Choice 3 A different version of keytool was used to sign the .apk file.Choice 4 The name of the application has been changed from what it originally was.Choice 5 You did not run zipalign on the APK before publishing. Android 4.0 Development, Question 1 of 40You have a long-run process that you do not want impacting your UI thread. You decide that spawning a new thread to do this work is appropriate, but you do not want to write all the boilerplate code to deal with the threads.Based on the scenario above, which class will provide the functionality you need?Choice 1 RunnableChoice 2 UIThreadChoice 3 UIWorkerChoice 4 BackgroundTaskChoice 5 AsyncTaskScenarioYou are working on an application with a main activity. You have a requirement to show another activity started from the main one but have it NOT be full-screen.Based on the scenario above, how do you achieve this requirement?Choice 1 Ensure the second activity's Activity class has a public boolean field AS_DIALOG set to true.Choice 2 Pass a boolean true as the third argument to the Intent constructor.Choice 3 Call startActivityAsDialog() to launch the second activity.Choice 4 TACNO!!!!!!Set the second activity to use android:theme="@android:style/Theme.Dialog".Choice 5 Set the ACTION_LAUNCH_DIALOG flag on the intent used to launch the second activity.According to Android guidelines, if you want to create a custom permission for your application and you want the permission to be automatically granted for all your other applications, you use:Choice 1 safe permission.Choice 2 signature permission.Choice 3 noCheck permission.Choice 4 selfSigned permission.Choice 5 system permission.ScenarioYou need to retrieve a list of private data files associated with your application. You only need a list of filenames, not File handles to the actual files themselves.Based on the scenario above, which method do you use to accomplish this goal?Choice 1 InputStream.listFiles()Choice 2 AssetManager.listPrivateFiles()Choice 3 Context.fileList() tacan!!!!!!!!!!!!!!!Choice 4 File.getFiles()Choice 5 Context.getFileNames()Sample Codelogcat radioBased on the sample code above, which change do you make to be able to log radio activity?Choice 1 Add -s before radio.Choice 2 Change radio to cell.Choice 3 Add -v after radio.Choice 4 Add -b before radio. tacno!!!!!!!!!Choice 5 Enclose radio in quotation marks.The subclass of BroadcastReceiver that you use to aid in implementing a provider for an application widget is:Choice 1 BroadcastProvider. mislim da je ovo tacno!!!!!!!!Choice 2 AppListenerBase.Choice 3 AppWidgetProvider.Choice 4 BroadcastProviderBase.Choice 5 AppWidgetBroadcastReceiver.Sample CodeBased on the sample code above, which method name replaces XXXX on line five to properly terminate the loop after the last record has been read?Choice 1 cursorExhausted()Choice 2 lastRecord()Choice 3 isAtEnd()Choice 4 isAfterLast() tacno!!!!!!!!Choice 5 isEnd()Based on the sample code above, which constant replaces XXXXXXXXXX to launch the activity this code is a part of when an NDEF payload is discovered in a received NFC tag?Choice 1 ACTION_PAYLOAD_FOUNDChoice 2 EXTRA_NDEF_MESSAGESChoice 3 ACTION_TAG_DISCOVEREDChoice 4 ACTION_NFC_NDEFChoice 5 ACTION_NDEF_DISCOVEREDYou need to access a remote system to retrieve data. The remote system provides a REST-based web service interface. You do not want to include any additional libraries in your application other than what Android provides.Based on the scenario above, which package included with the Android SDK contains classes that will enable you to accomplish your goals?Choice 1 java.net.restChoice 2 javax.ws.rsChoice 3 org.apache.httpChoice 4 org.apache.cxfChoice 5 javax.ws.restWhich debugging tool do you use to capture screenshots of your application running on a device?Choice 1 MonkeyChoice 2 scrcapChoice 3 adbChoice 4 tacan odgovor!! proverioDDMSChoice 5 Dev ToolsSample CodeBased on the sample code above, you ensure that the accuracy of the location is less than 100 meters by:Choice 1 calling getHighAccuracyLocation() instead of getLastKnownLocation().Choice 2 calling enhancedAccuracy(true) on the Location object.Choice 3 using ACCURACY_FINE instead of ACCURACY_LOW. valjda je ovoChoice 4 passing Context.LOCATION_SERVICE_ACCURATE to getSystemService().Choice 5 passing true to the Criteria constructor.Which of the following is an example of an attribute value in AndroidManifest.xml that references a string in a theme?Choice 1 ?drawable/headingChoice 2 /string/headingChoice 3 :string?headingChoice 4 ?string/headingChoice 5 @drawable/headingPicSample CodeBased on the sample code above, you initiate the configured transition and execute it over one second within the code of a View class with:Choice 1 ((TransitionDrawable)this.getTransition()).start(1);Choice 2 ((TransitionDrawable)this.getBackground()).initiateTransition(1);Choice 3 ((TransitionDrawable)this.getBackground()).startTransition(1000);Choice 4 ((TransitionDrawable)this.getBackground()).executeTransition(1000); ovo je tacno valjdaChoice 5 ((TransitionDrawable)this.getTransition()).run(1000);ScenarioYou want to provide cloud-based backup of your application's data. You look at several options and decide that the Android Backup Service fits your needs.Based on the scenario above, to use the Android Backup Service your application needs to:Choice 1 be modified by Google to include the proper backup interface code.Choice 2 get a private key from the user and register it with the service via a web service.Choice 3 have the android.BACKUP_SERVICE permission and provide a Backup Service Router (BSR).Choice 4 be registered with the service and provide a backup agent component.Choice 5 include a certificate obtained from Google in resources and provide a BackupManager.You have an application that is causing an Application Not Responding (ANR) dialog box. This application consists of a single screen with some text fields, a button to save the entries to a text file, and a broadcast receiver that triggers when a user taps the save button. You are able to enter data and save it without any problem during your hundreds of test executions, but the ANR dialog is still occurring randomly.Based on the scenario above, what is the cause of the ANR dialog box?Choice 1 The main application thread is heap dumping as the user navigates the screen.Choice 2 Too many child threads are being spawned by UI interactions.Choice 3 The broadcast receiver is randomly taking more than 10 seconds to execute.Choice 4 There is no response to an input event on the text fields within three seconds.Choice 5 The save operation is a blocking I/O call.To test if every string resource needed for your application is present for a default language by using the emulator, you:Choice 1 run your application and look for any ResourceUndefined exceptions in the logcat output.Choice 2 set the emulator to the unsupported language and run the application ensuring you do not get a force close.Choice 3 use the Dev Tools application to validate the application once you have transferred it to the emulator using adb.Choice 4 run DDMS against your application and note any "Missing String Resource" errors in the logcat window.Choice 5 run the resourceValidation tool on your application's APK file and ensure the errors.txt file is empty.Which class do you use to send an SMS message?Choice 1 dalvik.system.SmsGeneratorChoice 2 android.net.SmsSenderChoice 3 java.net.SmsCommChoice 4 android.telephony.SmsManager TACAN ODGOVOR NASAOChoice 5 android.os.MessageManagerBased on the sample code above, why is the output NOT correct?Choice 1 The namespace specified is incorrect.Choice 2 can only appear once.Choice 3 You cannot use hardcoded strings in AndroidManifest.xml for label values.Choice 4 Two main activities are not allowed to exist in the same package.Choice 5 The value of minSdkVersion is not a valid value.You want to have a single activity defined in AndroidManifest.xml be accessible by two names with two separate sets of intent filters.Referring to the scenario above, which attribute do you use?Choice 1 Choice 2 Choice 3 valjda ovoChoice 4 Choice 5 You are trying to troubleshoot your application using log messages, but the output of logcat has too much data in it to be useful. Therefore you want to limit the output to only show output from ActivityManager at a priority of Info or above, as well as anything from your application (using the tag CustomerProcessor) at Debug level or above.Based on the scenario above, which filter expression do you use with logcat to get the output you want?Choice 1 ActivityManager:I CustomerProcessor:D *:SChoice 2 ActivityManager:I CustomerProcessor:DChoice 3 ActivityManager=I CustomerProcessor=DChoice 4 --ActivityManager=info --CustomerProcessor=debug --All=silentChoice 5 ActivityManager(I) CustomerProcessor(D) *(S)WebView by default handles different screen densities by scaling webpages, so that all devices display them at the same relative size as a:Choice 1 extra-high-density screen.Choice 2 medium-density screen. ovo je tacnoChoice 3 AMOLED screen.Choice 4 high-density screen.Choice 5 low-density screen.When a call to a method implemented in an IBinder originates from another process, the method:Choice 1 is executed in a thread chosen from a pool in the same process as the caller.Choice 2 call fails with a SecurityViolationException thrown back to the caller.Choice 3 is executed in the caller's thread.Choice 4 call spawns a new thread within the main UI servicing thread.Choice 5 is executed in a thread chosen from a pool in the same process as the IBinder.Which class asynchronously connects to and monitors data sources and delivers them to the client?Choice 1 FragmentChoice 2 RemoteCursorChoice 3 Loader ovo je tacnoChoice 4 DataBridgeChoice 5 DataProviderjedno sam preskocio ono za muzikuBased on the sample code above, to ensure that a user must explicitly grant this permission when requested you:Choice 1 change the label and description values to reference standard Android permission string constants.Choice 2 change the protectionLevel to dangerous.Choice 3 change the permissionGroup to android.permission-group.REQUEST.Choice 4 add android:forceGrant="true" to the tag.Choice 5 add a child element true to the tag.Methods in bound services written using AIDL must:Choice 1 not alter persistent data.Choice 2 be written using AIDL.Choice 3 not use third-party classes.Choice 4 be thread-safe.Choice 5 return within two seconds.Google provides Android development extensions for which IDE?Choice 1 IntelliJ IDEAChoice 2 EclipseChoice 3 Netbeans mozdaChoice 4 JDeveloperChoice 5 JBuilderBased on the sample code above, which line of code must be added to attach the Bundle to the Intent so it can be passed to the next activity?Choice 1 i.addExtra(b);Choice 2 i.passBundle(b);Choice 3 i.putBundle(b);Choice 4 i.putExtras(b);Choice 5 i.addData(b);You want to show data from a content provider in a ListView.Based on the scenario above, which column needs to be returned as part of the records provided by the content provider?Choice 1 uniqueIDChoice 2 keyChoice 3 _ID valjda ovoChoice 4 _COUNTChoice 5 _IndexYou have an activity that needs to do some long-running background work. The code spawns a worker thread to do this. However, most of the time, Android is killing the thread to regain system resources before the work completes.Based on the scenario above, you keep the background process from being killed by:Choice 1 ensuring the thread only posts messages back to UI components.Choice 2 implementing it as a service instead of a worker thread.Choice 3 starting the worker thread with the runOnUiThread() method.Choice 4 setting the android:doNotKill to true in the manifest for the application.Choice 5 setting the classification of the thread to daemon and setting its priority to low.Which of these standard broadcast actions are NOT protected for system use only and therefore can be broadcast by your application?Choice 1 ACTION_UID_REMOVEDChoice 2 ACTION_POWER_DISCONNECTEDChoice 3 ACTION_TIMEZONE_CHANGEDChoice 4 ACTION_TIME_CHANGED tacno sigurno 100%Choice 5 ACTION_TIME_TICKIf your application does not specifically require a camera using a manifest declaration, how do you check to see if a camera is available at runtime?Choice 1 boolean hasCamera = context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) ? true : false;Choice 2 boolean hasCamera = getPackageManager().hasSystemFeature(PackageManager.HARDWARE_CAMERA) ? true : false;Choice 3 boolean hasCamera = context.getPackageManager().hasSystemFeature(PackageManager.HARDWARE_CAMERA) ? true : false;Choice 4 boolean hasCamera = system.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA) ? true : false;Choice 5 boolean hasCamera = context.getPackageManager().hasHardware(PackageManagerFeature.CAMERA) ? true : false;You have an application that was written to target an API level of Android prior to 13. While versions of Android above 3.2 must use screen compatibility mode to stretch your application to fit the screen, this results in pixelation and generally doesn't look as attractive as the application does on smaller screens. The application functions as expected in all cases though, and you do not have resources to significantly modify the application.Based on the scenario above, the way you ensure the application looks good at all resolutions is to:Choice 1 rewrite the application from the ground up to target the new screen sizes.Choice 2 add the android:compatibleWidthLimitDp to your element with a value of 320 or higher.Choice 3 use the android:maxSdkVersion to stop your application from running on non-supported devices.Choice 4 provide alternative layouts for different screen sizes.Choice 5 include a element in your manifest.String lc = context.getResources().getConfiguration().locale.getLanguage();In order for the sample code above to provide the ISO language code, you change:Choice 1 getConfiguration() to getISOConfiguration().Choice 2 getResources() to getISO3Resources().Choice 3 getLanguage() to getISOLanguage().Choice 4 locale to iso3Locale.Choice 5 getLanguage() to getISO3Language(). ovo je tacnoGiven activity A that launches activity B that then launches activity C, which Intent flag do you use to launch activity B to ensure that activity A is shown instead of activity B when the user presses the back button from activity C?Choice 1 FLAG_ACTIVITY_EXCLUDE_FROM_RECENTSChoice 2 FLAG_ACTIVITY_NO_BACKChoice 3 FLAG_ACTIVITY_IGNOREChoice 4 FLAG_ACTIVITY_SKIPChoice 5 FLAG_ACTIVITY_NO_HISTORY ovo jeBased on the sample code above, which line of code copies the URI to the clipboard?Choice 1 Object o = (ClipData)ClipData.getURI(myURI);Choice 2 Clip c = Clip.newUri(getContentResolver(), "URI", myURI);Choice 3 ClipData c = ClipData.newUri(getContentResolver(), "URI", myURI);Choice 4 ClipData c = new ClipData(getContentResolver(), "URI", myURI);Choice 5 Object o = (ClipData)ClipData.newUri(new ContentResolver(), myURI);Which snippet of code do you use to determine if the package com.company.app is allowed to initiate a phone call without going through the Dialog interface?Choice 1 Context.checkPermission("com.company.app", "android.permission.CALL_PHONE");Choice 2 context.getPackageManager().checkPermission("com.company.app", "android.permission.MODIFY_PHONE_STATE");Choice 3 context.getPackageManager().checkPermission("android.permission.CALL_PHONE", "com.company.app");Choice 4 PackageManager.get("com.company.app").validatePermission("android.permission.CALL_PHONE");Choice 5 context.getPackageManager().checkPermission("android.permission.MODIFY_PHONE_STATE", "com.company.app");http://alttest.123assess.com/do/bb1If users are complaining that your application, which stores data on a remote server, is draining their batteries, you must ensure that the application is not:Choice 1 requesting a low-speed connection from the system when a high-speed one is available.Choice 2 spawning multiple content providers, since each one needs a network connection.Choice 3 using fragments to render its UI due to their reliance on sockets.Choice 4 constantly retrying failed network operations.Choice 5 trying to access a site mirror that is too far away from the device's current location.