Wednesday , November 20 2019

Home / Test Answer / upwork / Android Programming Test Answer
Android Programming Test Answer

Android Programming Test Answer

Upwork is one of the most famous freelancing websites within the global Android Programming Test Answer . It starts offevolved over a decade ago tech lead of a Silicon Valley. It’s miles the quality platform for the far flung process. You can retain your paintings from everywhere within the world. There are various varieties of jobs in Upwork.

Upwork Android Programming Test Answer  take a look at question and answer.
Lots of Android Programming/ Apps improvement jobs posted on Upwork each day. If you are an Android Programming / android apps development professional, you can do that job remotely. And you could boom your earning.

You can Read More Article :

 

1. What is the difference between a Broadcast Receiver and an Intent Filter?

  • A Broadcast Receiver allows an app to register to be notified upon system or application events, an Intent Filter specifies which Intents an app can receive.
  • A Broadcast Receiver allows an app to receive video streams from live media sources, an Intent Filter determines which URLs are supported.
  • A Broadcast Receiver is a component of the TelephonyManager that determines the cellular network that the device can connect to, an Intent Filter removes noise from telephone call audio.
  • A Broadcast Receiver is a server-side endpoint that an app can communicate with, an Intent Filter determines which Android IDs can access the endpoint.

2. One can declare logical parent “.MainActivity” to by adding the following line in respective in AndroidManifest.xml.

  • android:parentActivityName=”.MainActivity”
  • android:logialParentActivityName=”.MainActivity”
  • android:parentActivity=”.MainActivity”
  • android:activityName=”.MainActivity”

3. Which of the following lifecycle methods are common to both Activity and Fragment?

  • onAttach()
  • onCreate()
  • onStart()
  • onDetach()

Note: There may be more than one right answer.

4. The strings.xml has a ____ element, which contains one or more elements.

  • < container >
  • < main >
  • < resources >
  • < strings >

5. The ‘showAsAction’ attribute of item in a menu resource file can have which of the following values? Check all that apply.

  • ifRoom
  • withText
  • never
  • withIcon

Note: There may be more than one right answer.

6. To run your app on REAL device which of the following are required? Check all that apply.

  • Enable USB debugging on Android device
  • Install USB driver for Windows or create udev rules file for Linux. No USB drivers needed for Mac
  • Create AVD in Android Studio
  • Plug Android device to your computer

Note: There may be more than one right answer.

7. Which of the following is true for R.java? (choose all that apply)

  • R.java is a special Java file that gets generated by the Android tools whenever you create or build your app
  • Android uses R.java to keep track of the resources used within the app
  • It enables you to get references to GUI components from within your activity code
  • It contain string resources

Note: There may be more than one right answer.

8. Which of the following is/are correct about Intent filter?

  • An intent filter specifies what types of intent each component can receive.
  • Intent filters are defined inside AndroidManifest.xml
  • An intent filter also specifies a category
  • An intent filter must include a category of android.intent.category.DEFAULT, if it’s to receive explicit intents

Note: There may be more than one right answer.

9. What must be done after a TypeArray is no longer needed?

  • The invalidate() method must be called in order to refresh the contents of the object.
  • The recycle() method must be manually called in order to notify the system that the object is no longer using the memory allocated to it.
  • The onDestroy() method must be manually called in order to notify the system that the object is no longer using the memory allocated to it.
  • The keepalive() method must be called in order to notify the system that the object is still being used and to prevent GC from clearing it.

10. Buttons and text views both inherit from the same Android class named ___.

  • view.View
  • android.View
  • android.view.View
  • android.view.Layout

11. What are the Android Support Libraries for?

  • They provide APIs that allow developers to provide in-app customer support features.
  • They provide APIs that allow developers to provide features aimed at users with additional accessibility requirements.
  • They allow features introduced in more recent versions of Android to be used on devices running older OS versions.
  • They allow devices running the latest version of Android to use deprecated features from older OS versions.

12. What does the following code do?

try {
	String token = GoogleAuthUtil.getToken(this, email, 
"https://www.googleapis.com/auth/devstorage.read_only");
	System.out.println(token);
} catch (IOException e) {
	System.out.println("IOException");
} catch (UserRecoverableAuthException e) {
	System.out.println("UserRecoverableAuthException");
} catch (GoogleAuthException e) {
	System.out.println("GoogleAuthException");
}
  • prints token
  • prints IOException
  • prints UserRecoverableAuthException
  • prints GoogleAuthException

13. ____ are like reusable components or subactivities and can be reused between screens.

  • Views
  • Activities
  • Fragments
  • Layouts

14. Which statement converts the Object into String?

  • String.valueOf(Object)
  • String.value(Object)
  • string.valueOf(Object)
  • None of the above

15. Which superclass do most UI elements extend?

  • View
  • Widget
  • LinearLayout
  • Activity

16. When publishing updates to an app on the Google Play Store, which of the following is true?

  • The versionCode must remain the same.
  • The keystore used to sign the APK to publish the app must match previous published versions.
  • The package name must be the same.
  • The versionCode must be incremented or higher than the previous published version.
  • The versionCode must be decremented or lower than the previous published version.
  • The keystore used to publish the app must be different from that used for previous published versions.

Note: There may be more than one right answer.

17. What is the purpose of a Loader?

  • Loaders are special-case data streams that provide a bytewise iterator when accessing files from external storage.
  • Loaders are convenience classes that make the asynchronous fetching and loading of data into a Fragment or Activity easier.
  • Loaders are Android native classes that are used when graphics are drawn to screen via a canvas.
  • Loaders are UI elements that indicate to the user at an asynchronous action is in progress.

18. Which feature of the Java build process allows for Android projects with more than 65k method calls?

  • The Gradle build process
  • Multidexing
  • Proguard/Dexguard
  • The Android Run Time (ART)

19. Which of the following correctly adds a string array resource to strings.xml?

  • < string_array name="string_array_name" >
    	< item > string_value1< /item >
    	< item >string_value2< /item >
    	< item >string_value3< /item >
    < /string_array >
    
  • < array name="string_array_name" >
    	< item >string_value1< /item >
    	< item >string_value2< /item >
    	< item >string_value3< /item >
    < /array >
    
  • < string-array name="string_array_name" >
    	< item >string_value1< /item >
    	< item >string_value2< /item >
    	< item >string_value3< /item >
    < /string-array >
    
  • None of the above

20. When does ANR occur?

  • When a network thread pauses for more than a minute.
  • When there has been no response to a system event within 5 seconds.
  • When there has been no response to user input event within 5 seconds.
  • When the app is selected from within the app launcher, but is not installed.

21. What is a Master Detail pattern?

  • A layout pattern consisting of a Master layout (containing a collection of data) and Detail (containing detailed information about an item from the collection).
  • A term used in parallel processing where there are multiple Detail threads controlled by a hypervising Master thread manager.
  • A layout pattern consisting of a Detail layout (containing a collection of data) and Master (containing detailed information about an item from the collection).
  • A layout pattern consisting of a user-interactive Master layout, and a passive non-touch-enabled Detail layout.

22. Which of the following are true for intent?

  • It’s a type of message that allows you to bind separate objects (such as activities) together at runtime.
  • If one activity wants to start a second activity, it does it by sending an intent to Android.
  • startActivity(intent); 
    This tells Android to start the activity specified by the intent.
  • Intent is an Object

Note: There may be more than one right answer.

23. What does the following code do?
Calendar cal = Calendar.getInstance();
DateFormat dateFormat = new SimpleDateFormat(“yyyy-MM-dd”);
cal.add(Calendar.DATE, -1);
return dateFormat.format(cal.getTime());

  • Get yesterday date and returns its formatted string
  • Get today date and returns its formatted string
  • Get tomorrow date and returns its formatted string
  • All of the above

24. When creating main Android App project with Android studio, how can we support localization of the Android App?

  • main/res/AndroidManifest.xml
  • main/res/layout/activity_my.xml
  • main/res/values/strings.xml
  • main/res/values/styles.xml

25. Which of the following is the correct location of the menu resource file?

  • res/menu/filename.xml
  • res/menus/filename.xml
  • res/resource/filename.xml
  • res/layout/filename.xml

26. What is the purpose of Volley?

  • A type-safe client for consuming RESTful APIs in Android and Java in general.
  • A convenience library that makes network calls easier and faster.
  • An Android unit testing framework.
  • An analytics tool that can shed light on parts of an app’s UI that are used most/least.

27. he addCategory() method places a category in an Intent object, ____ deletes a category previously added, and ____ gets the set of all categories currently in the object?

  • destroyCategory()
  • removeCategory()
  • setCategories()
  • getCategories()

Note: There may be more than one right answer.

28. Which of the following is true?

  • Fragments are top-level classes that can contain and manage Activities.
  • Activities are top-level classes that can contain and manage Fragments.
  • Fragment is the superclass for UI elements such as Buttons, EditText boxes and ImageViews.
  • A Fragment is a data bundle that contains information that an Activity requires in order to be drawn to the display.

29. To pass extra information with intent we can use the following Intent object method?

  • putExtra()
  • putMessage()
  • putText()
  • putValue()

30. What is a RemoteView for?

  • It defines a view hierarchy that can be displayed in another process, such as a rich notification layout or home screen widget.
  • It defines an inputstream that can display a remote device such as a hardware camera.
  • It allows apps to interact with the Google Cast API.
  • It is a base class that allows your app to send a limited set of control commands and serve as an Android TV remote control.

31. What is Guava?

  • A hybrid web framework used for developing cross-platform apps for Windows Phone, iOS and Android.
  • An open-source project consisting of common libraries for Java, maintained and primarily developed by Google.
  • A library that makes it easy for developers to integrate RESTful APIs using industry-standard encryption techniques.
  • An OpenGL graphics library aimed specifically at Android devices.

32. What is Retrofit?

  • A collection of libraries that allows older versions on Android to support the latest APIs and libraries released with newer versions of the platform.
  • A type-safe client for consuming RESTful APIs in Android and Java in general.
  • A competing operating system from Apple.
  • The name given to Google’s integrated fitness and activity tracking API available in recent version of Android.

33. Which file contains information about the app?

  • android.xml
  • AndroidManifest.xml
  • Manifest.xml
  • strings.xml

34. To connect list view to array we can use:

  • ArrayAdapter
  • listView
  • Activity
  • Handle

35. Which method sets the layout for the activity?

  • setLayoutView()
  • setActivityView()
  • setView()
  • setContentView()

36. Going to check network connection with below source code. What can be required to make it work?

public boolean isOnline() {
	ConnectivityManager cm = (ConnectivityManager)
	getSystemService(Context.CONNECTIVITY_SERVICE);
	NetworkInfo netInfo = cm.getActiveNetworkInfo();
	if (netInfo != null && netInfo.isConnectedOrConnecting()) return true;
	return false;
}
  • android.permission.ACCESS_NETWORK_STATE
  • android.permission.ACCESS_NETWORK_CONNECTION
  • android.permission.INTERNET
  • android.permission.ACCESS_WIFI_STATE

37. What is the purpose of the AppCompat library?

  • It allows the ActionBar UI pattern to be used on older versions of Android.
  • It allows the app to share content with other apps via the share intent.
  • It allows for the developer to internationalize their app.
  • It allows the SnackBar UI to be used on newer versions of Android.

38. Which object can be used to display a pop-up message?

  • Dialogue
  • Intent
  • Toast
  • Popup

Note: There may be more than one right answer.

39. The best practice is to put string values in ___ file.

  • strings.xml
  • strings.java
  • android.text
  • resource.rsc

40. When defining a View within an XML layout, which two attributes are always required?

  • Width and Height
  • LayoutSum and LayoutWeight
  • Style and LayoutWeight
  • Height and Orientation

Check Also

CCleaner 5.62.7538 Final Full Version

CCleaner 5.62.7538 Final Full Version

CCleaner 5.62.7538 final full model is the ultra-modern software of CCleaner which can be used …

Leave a Reply

Translate »