google.com, pub-8658045329707802, DIRECT, f08c47fec0942fa0
Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
 
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

Showing posts with label Upwork Android Programming Test Answer 2019. Show all posts
Showing posts with label Upwork Android Programming Test Answer 2019. Show all posts

Android Programming Test Answer 2019


1. What is the correct way to fix if checking the status of the GPS_PROVIDER throws SecurityException?
Answers:
• request permission for ACCESS_COARSE_LOCATION
• request permission for ACCESS_FINE_LOCATION
• request permission for INSTALL_LOCATION_PROVIDER
• None of the above

2. Consider the code snippet below:
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(PATH_TO_FILE);
<Some code here>
mp.start();
Which of the following should be placed at <Some code here>?
Answers:
• mp.prepare();
• mp.prepareAsync();
• mp.loadMedia();
• mp.loadSource();
• mp.loadSource(); mp.prepare();
• No code is required at <Some code here> to start playback.

3. Which of the following would you have to include in your project to use the APIs and classes required to access the camera on the mobile device?
Answers:
• import android.drivers;
• import android.hardware.camera;
• import android.camera;
• import android.util;
• import android.hardware;

 4. Which of the following can be accomplished by using the TelephoneNumberUtil class?
Answers:
• Save a phone number to the contacts in the phone device.
• Retrieve a phone number from the contacts in the phone device.
• Delete a phone number from the contacts in the phone device.
• Format an international telephone number.
• Setting and retrieving the call forwarding phone number on the phone device.

5. Which of the following are UI elements that you can use in a window in an Android application?
Answers:
• TextBox
• TextView
• TextField
• TextElement
• EditText
• RichText

6. Which of the following is not Content Provider?
Answers:
• Contacts
• Contacts
• Shared Preferences
• MediaStore
• Bookmarks
• Settings

7. What does the following code do?
SensorManager mgr = (SensorManager) getSystemService(SENSOR_SERVICE);
List<Sensor> sensors = mgr.getSensorList(Sensor.TYPE_ALL);
for (Sensor sensor : sensors) {
System.out.println(«»+sensor.getName());
}
Answers:
• prints names of all available sensors in device
• prints names of all available sensor types in device
• prints names of all sensors which are not available
• none of above

8. Which of the following is correct to use for data transfer regularly and efficiently, but not instantaneously?
Answers:
• AsyncTask
• IntentService
• Sync adapters
• All of these

9. What is the ListActivity class used for?
Answers:
• Create a view to display a list of items from a data source.
• List all the activities currently running on the Android device.
• List all the activites that are installed on the Android device.
• List the activities whose IntentFilters match with a particular Intent type.

10. Which of the following would you have to include in your project to use the SimpleAdapter class?
Answers:
• import android.content;
• import android.widget;
• import android.database;
• import android.database.sqlite;
• import android.util;

11. Which of the following is the best way to request user permission if an Android application receives location updates from both NETWORK_PROVIDER and GPS_PROVIDER?
Answers:
• Adding this line to the Android manifest file: <uses-permission android:name=»android.permission.ACCESS_FINE_LOCATION» />
• Adding these two lines to the Android manifest file: <uses-permission android:name=»android.permission.ACCESS_FINE_LOCATION» /> <uses-permission android:name=»android.permission.ACCESS_COARSE_LOCATION» />
• Adding this line to the Android manifest file: <uses-permission android:name=»android.permission.ACCESS_FINE_LOCATION» />
• Adding this line to the Android manifest file: <uses-permission android:name=»android.permission.CONTROL_LOCATION_UPDATES» />

12. Which of the following can you use to display an HTML web page in an Android application?
Answers:
• WebBrowser
• BrowserView
• WebView
• Browser
• HtmlView

13. Which of the following statements are correct with regards to signing applications?
a) All applications must be signed.
b) No certificate authority is needed.
c) When releasing application special debug key that is created by the Android SDK build tools can be used.
Answers:
• a) and b) are true
• a) and c) are true
• b) and c) are true
• all statements are true

14. Which of the following is the immediate base class for Activity and Service classes?
Answers:
• Application
• ApplicationContext
• Context
• Component
• Object

15. Which of the following statement is correct regarding StrictMode?
Answers:
• StrictMode detects improper layouts
• StrictMode detects operation which blocks UI
• StrictMode detects the speed of the connection
• All of the above

16. Which of the following is/are appropriate for saving the state of an Android application?
Answers:
• Activity.onFreeze()
• Activity.onPause()
• Activity.onStop()
• Activity.onDestroy()