UPWORK ANDROID PROGRAMING TEST 2016
It is tough to answer the questions in a short time. Here we have categorized the questions. When you are going to seat for exam, follow the categories to answer them. Hope you can find the answer in shorter time.Upwork Test Answer Adobe Illustrator cs6
Upwork US English Basic Skills Test-2016
Upwork readiness test for beginners - 2016
QUESTIONS ABOUT ''CODING''
1. 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>?
- mp.prepare();
- mp.prepareAsync();
- mp.loadMedia();
- mp.loadSource();
- mp.loadSource; mp.prepare();
- no code is required at <some code here> to start back.
2. Consider the XML fragment below, which is taken from one of the files in an Android project:
<MyElement xmls:"http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Some Text>
</MyElement>
Which one of the are true about the XML fragment above?
- It is taken from the manifest XML file of the Android project.
- It is taken from an XML file used to define a view.
- It is taken from the package file (.apk) of the Android project.
- The xmlns: attribute is a compulsory attribute.
- If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute
- MyElement should be the name of a class derived, directly or indirectly, from the view class.
3. Consider the following snippet of code:
<font size =2>
@Override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences(“MyPrefs”, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(“MyBool”, true);
<some more code here>
}
- </font
- editor.save(); editor.close();
- editor.save(); editor.finish();
- editor.commit();
- editor.save();
- editor.close();
- editor.finish();
try {
String token = GoogleAuthUtil.getToken(this, email.
"https://www.googleapis.com/auth/devstorage.read_only")
System.out.println(token);
} catch (IOExceptioon) {
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
5. Consider the XML fragment below, which is taken
from one of the files in an Android project:
<MyElement
xmlns:”http://schemas.androd.com/apk/res/android”
android:layout_width = “fill_parent”
android:layout_height = “fill_parent”
android:text = “Some Text”>
</MyElement>
Which of the following are true about the XML fragment
above?
- It is taken from the manifest xml file of the Android project.
- It is taken from an XML file used to define a view.
- It is taken from the package file (.apk) of the Android project.
- The xmlns: attribute is a compulsory attribute.
- If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute.
- MyElement should be the name of a class derived, directly or indirectly, from the View class.
6. Consider the code snippet below:
public class MyReceiver extends PhoneStateIntentReceiver
{
@Override
public void onReceiveIntent(Context
context, Intent intent)
{
if
(intent.action == Intent.CALL_ACTION)
{
}
}
}
Assuming that notifyPhoneCallState has been called to
enable MyReceiver to receive notifications about the phone call states, in
which of the following cases will the code in get executed?
- When the device receives an incoming phone call
- When an outgoing phone call is initiated on the device.
- When the user presses the CALL button on the device.
- The code in will never get executed.
public boolean isOnline() {
ConnectivityManager connMgr = (ConnectivityManager)
getSystemService(Context.CONECTIVITY_SERVICE);
NetworkInfo networkInfo=connMgr.getActiveNetworkInfo();
return (networkInfo != null && networkInfo.isConnected());
}
- Checking Network connection
- Checking only WIFI network connection.
- Checking only Bluetooth data connection
- Checking only Ethernet data connection
QUESTIONS START WITH ''WHAT''
1. What is the maximum supported file for a single APK file(excluding expansion packages) in the Google Play Store?
- 50MB
- 2GB
- 30MB
- Unlimited
- A new programming language that can be used to develop applications for mobile devices.
- A new IDE that can be used to develop applications for mobile devices.
- A software stack for mobile devices that includes an operating system, middleware and key applications.
- A new mobile developed by Google.
- To play rich media content files.
- To create and publish rich media files.
- To share data between Android applications.
- To access the global information about an application environment.
- To maintain global state.
- A framework to create unit tests for Android projects.
- A resource editor to create user interface for Android applications.
- A tool to generate Android byte code from .class files.
- An emulator to execute and debug Android projects
- A command line tool to create Android project files.
- A framework to create unit tests for Android projects.
- A tool to generate Android byte code from .class files.
- An emulator to execute and debug Android projects.
- A command line tool to create Android project files.
- A framework to create unit tests for Android projects.
- A resource editor to create user interface for Android applications.
- A tool to generate Android byte code from .class files.
- An emulator to execute and debug Android projects
- Create a view to display a list of items from data source.
- List all the activities currently running on the Android device.
- List the activities that are installed on the Android device.
- List the activities whose IntentFilters match with a particular Intent type.
- 50MB
- 2GB
- 30MB
- Unlimited
9. What is correct regarding GCM – Google Cloud
Messaging service?
- It does server to device communication.
- It does device to server communication.
- It does device to server communication and vice versa.
- It does device to device communication.
10. What is the interface Spannable used for?
- Manipulate text that can span across multiple pages.
- Manipulate text that can span across multiple TextView windows.
- This is the interface for text to which markup objects can be attached and detached.
- String parsing.
11. What is the correct way to restrict app visibility
on Google Play to devices that have a camera?
- <uses-feature android:name=”android.hardware.camera”/>
- <uses-feature android:name=”android.hardware.camera” android:required=”true” />
- <uses-feature android:name=”android.hardware.camera.front” android:required=”true” />
- <uses-permission android:name=”android.permission.CAMERA”/>
QUESTIONS START WITH ''WHICH''
1. Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?- Both of them are used to dial a phone number on the device.
- Intent.CALL_ACTION is true when a phone call is received on the device.
- Intent.CALL_ACTION is used when a phone number is to be dialed without showing a UI on the device.
- Intent.DIAL_ACTION is used when a phone number is to be dialed without showing a UI on the device.
- Intent.CALL_ACTION is used when a phone number is to be dialed without the user having to explicitly initiate the call.
- Intent.DIAL_ACTION is used when a phone number is to be dialed without showing a UI on the user having to explicitly initiate the call.
- android:versionCode
- android:versionName
- android:targetSdkVersion
- android:maxSdkVersion
- lint
- ProGuard
- zipalign
- etc tool
- import android.drivers;
- impoort android.hardware.camera;
- import android.camera;
- import android.util;
- import andriod.hardware;
- Java
- C# with .NET Compact Framework for mobile devices.
- C programming language.
- Android programming language.
- Adding this file to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
- Adding this file 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 file to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
- Adding this file to the Android manifest file: <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION_UPDATED"/>
- 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 device.
- android.hardware
- android.bluetooth
- android.bluez
- org.bluez
- SimpleCursor
- SimpleCursorAdapter
- SimpleAdapter
- SQLiteCursor
- SQLLitwAdapter
- MIDLet
- AndroidApp
- Activity
- AppLet
- Application
- Activity.onFreeze()
- Activity.onPause()
- Activity.onStop()
- Activity.onDestroy()
- import android.content;
- import android.widget;
- import android.database;
- import android.database.sqlite;
- import adnroid.util;
- The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the same private key.
- The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the same private key.
- The android:versionCode attribute in the manifest file must be incremented and the APK file must be signed with the new private key.
- The android:versionCode attribute in the manifest file must be same and the APK file must be signed with the new private key.
- Activity.onStop()
- Activity.onPause()
- Activity.onDestroy()
- Activity.onShutdown()
- Activity.onFreeze
- On Create Options Menu can be used to enable/disable some menu items in an Android application.
- On Prepare Options Menu can be used to enable/disable some items in an Android application.
- On Show Options Menu can be used to enable/disable some items in an Android application.
- The menu items in an Android application cannot be disabled
- StrictMode detects improper layouts
- Strictmode detects operation which blocks UI
- StrictMode detects the speed of the connection
- All of the above
- SQLiteOpenHelper
- SQLiteDatabase
- ContentProvider
- DatabaseHelper
- Using the "adb install/path/to/apk" command prompt/terminal, when USB Debugging Mode is enabled in the device.
- Exporting and signing the package, then browsing it to install.
- Launching the application from an IDE, when USB Debugging Mode is enabled in the device.
- All of these.
ApplicationInfo, SyncInfo, ActivityInfo, PackageInfo
- ApplicationInfo
- SyncInfo
- ActivityInfo
- PackageInfo
1. A) HTTP
2. B) XMPP
3. C) SOAP
4. D) RMI
- A and B
- A,B,C
- C,D
- All of these
1. A) call getToken() on the UI thread
2. B) call getToken() on AsyncTask
- Statement A is true, while Statement B is false.
- Statement B is true, while Statement A is false.
- Both statements are ture.
- Both statements are false.
@override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences("MyPrefs",0);
editor.putBoolean("MyBool",true);
<some code here>
}
Which of the following should be used<some more code here>?
- editor.save();editor.close();
- editor.save();editor.finish();
- editor.commit();
- editor.save();
- editor.close();
- editor.finish();
- TextBox
- TextView
- TextField
- EditText
- TextElement
- Contacts
- Shared Preferences
- Bookmarks
- Settings
- MP4
- MPEG
- AVI
- MIDI
A) com.google.android.c2dm.permissioon.RECEIVE
B) android.permission.INTERNET
D) android.permission.GET_ACCOUNTS
E) android.permission.WAKE_LOCK
F) A receiver for com.google.android.c2dm.intent.RECEIVE, with the category set ass application Package. The receiver should require the com.google.android.c2dm.SEND permission.
- A,B,C and D
- C,D,E and F
- A,B,E and F
- all of those
- Linear acceleration sensor
- Gravity sensor
- Rotation Sensor
- Accelerometer sensor
- Image View
- Image Button
- Both of the above
- None of these
A) Running sync adapter in response to a user request.
B) Running sync adapter periodically by setting a period of time to wait between runs, or by running it at certain times of the day, or both.
- Statement A is true, while statement B is false
- Statement Bis true, while statement A is false
- Both statements are true
- Both statements are false.
a) INTERNET
b) ACCESS_NETWORK_STATE
- a
- b
- Both
- None
- AsyncTask
- IntentService
- Sync adapters
- All of those
- ProgressBa
- ProgressDialog
- ProgressItem
- startActivity and startActivityForResult can both be used to start a new activity from your activity class.
- only Only startActivityForResult can be used to launch a new activity from your activity class.
- startActivity(myIntent); and startActivityForResult(myIntent,-1); have the same result.
- When startActivity is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.
- When startActivityForResult is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.
- FEATURE_NO_TITLE
- FEATURE_NO_ICON
- FEATURE_RIGHT_ICON
- FEATURE_TRANSPARENT_WINDOW
- Binde
- Flow
- Navigate
- Intent
- ApplicationContext
- Looking for the package attribute's value of the <manifest> element in the manifest file.
- Executing the command, "pm list packages -f", in the ADB shell.
- Programmatically, using PackageManager in an installed Android app.
- Using the AAPT platform tool, "aapt dump badging apkName.apk".
- onCreate
- onLnit
- onCompleteThaw
- onRestart
- Debug mode
- Release mode
- Production mode
- Development mode
- Adapte
- Manage
- Matche
- BlutoothAdapte
a) All applications must be signed
b) No certificate authority is needed
c) When releasing application special debug key that is creaed by the Android SDK uild tools can be used.
- a and b are true
- a and c are true
- b and c are true
- All statements are true
No comments:
Post a Comment