Download File - Ajit k Sinha

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Location Based Service - Android questions
Q.1 Which element is used to display Google map in your UI.
A) View
B) Map
C) MapView
D) None of the above
ANSWER: C
Q.2 For using Google map which permission you will specify in the AndroidManifest.xml?
A) USEMAP
B) USE_GOOGLE_MAP
C) INTERNET
D) None of the above.
ANSWER: C
Q.3 What is geocoding?
A) Geocoding is the act of converting an address into its coordinates (latitude and longitude).
B) Geocoding converts a pair of location coordinates into an address.
C) Geocoding means geographical coding.
D) None of the above.
ANSWER: A
Q.4 If you have used the Google Maps API into your Android application but it does not show the map
when the application is loaded, what could be the possible reasons?
A) No Internet connection
B) Incorrect placement of the element
in the AndroidManifest.xml file
C) Missing INTERNET permission in the AndroidManifest.xml file
D) All of the above.
ANSWER: D
Q.5 To enable zoom control on google map, Which method of MapView is used?
Suppose that instance of MapView is mapView.
A) ZoomControls.Enabled=true.
B) mapView.setBuiltInZoomControls(true);
C) mapView= ZoomControls(true);
D) None of the above.
ANSWER: B
Q.6 By default, Google Maps displays the map of the United States when it is first
loaded. How you can display the particular location?
A) You cannot change the default locaction.
B) setZoom= true.
C) By using the animateTo() method of the MapController class.
D) None of the above.
ANSWER: C
Q.7 How will you add marker on map?
A) Directly use draw method.
B) You cannot add marker on the map.
C) Implement an Overlay class and override the draw() method.
D) None of the above.
ANSWER: C
Q.8 Which class is used to access to the system location services?
A) LocationManager
B) Object
C) GoogleManager
D) None of the above.
ANSWER: A
Q.9 How will you instantiate LocationManager object?
A) LocationManager LM =new LocationManager();
B) LocationManager LM = getSystemService(Context.LOCATION_SERVICE).
C) LocationManager LM = Context.LOCATION_SERVICE.
D) None of the above.
ANSWER: B
Q.10 If you know the address of a location but want to know its latitude and longitude,
then which class is used?
A) Geocoder
B) Location
C) MapViewLocation
D) None of the above.
ANSWER: A
Q.11 What are the different location provider are available that you can use to obtain
lacation data?
A) LocationManager.GPS_PROVIDER
B) LocationManager.NETWORK_PROVIDER
C) LocationManager.PASSIVE_PROVIDER
D) All of the above.
ANSWER: D
Android Adapter and Views - questions and answers
Q.1 What is the default layout in android application?
A) RelativeLayout
B) TableLayout
C) LinearLayout
D) FrameLayout
ANSWER: A
Q.2 When a button is clicked, which listener you can use?
A) SetOnClickListener
B) OnClickListener
C) ClickListener
D) None of the above.
ANSWER: B
Q.3 OnCheckedChangeListener can be used with which control?
A) RadioButton
B) CheckBox
C) Option A and B are correct.
D) None of the above.
ANSWER: C
Q.4 To display text which control you will use?
A) EditText
B) TextView
C) label
D) None of the above.
ANSWER: B
Q.5 Which method sets the minimum number of characters the user must type before the suggestions
appear as a drop-down menu, while working with ArrayAdapter?
A) SetMinChar()
B) MinChar()
C) setThreshold()
D) None of the above.
ANSWER: C
Q.6 What code you will write to create an array in strings.xml fi le located in the res/values folder?
A)
<string-array name=”days”>
<item>Sunday</item>
<item>Monday</item>
<item>Tuesday</item>
</string-array>
B)
<string name=”days”>
<item>Sunday</item>
<item>Monday</item>
<item>Tuesday</item>
</string>
C)
string item[3];
<item>Sunday</item>
<item>Monday</item>
<item>Tuesday</item>
D) None of the above.
ANSWER: A
Q.7 How will you access the array that is created in strings.xml file located in the res/values folder?
Suppose that array name is days and spinner control is used.
A) ArrayAdapter adapter= ArrayAdapter.createFromResource(this, R.array.days,
android.R.layout.simple_spinner_item);
B) findViewByID(days);
C) String arr[]=(array)findViewByID(days);
D) None of the above.
ANSWER: A
Q.8 You can shut down an activity by calling which method?
A) finishActivity()
B) finish()
C) destroy()
D) None of the above.
ANSWER: B
Q.9 To embed a web browser in your activity which view you will use?
A) RichTextView
B) Browser
C) WebView
D) None of the above.
ANSWER: C
Q.10 How will you access the array that is created in .java file ? Suppose that array name is days.
A) ArrayAdapter<String> adapter = new ArrayAdapter<String> (days);
B) ArrayAdapter<String> adapter = new ArrayAdapter<String> (this,
android.R.layout.simple_dropdown_item_1line, days);
C) ArrayAdapter<String> adapter = new ArrayAdapter<String> (android.R.layout.simple_dropdown_item_1line,
days);
D) None of the above.
ANSWER: B
Q.11 Which control works as a dropdownlist in Android?
A) ComboBox
B) List
C) Spinner
D) None of the above.
ANSWER: C
Q.12 Which component is not activated by Intent?
A) Services
B) Activity
C) contentProvider
D) None of the above.
ANSWER: C
Content Provider in Android - questions and answers
Q.1 To share data across packages in Android which object you will prefer?
A) SharedPreference
B) ContentProvider
C) DataProvider
D) None of the above.
ANSWER: B
Q.2 To query a content provider, you specify the query string in the form of a URI. The format of the
query URI is as follows:
<standard_prefix>://<authority>/<data_path>/<id>
What you will write in place of <standard_prefix> ?
A) content
B) object
C) ContentProvider
D) None of the above.
ANSWER: A
Q.3 For reading the contacts from the Contacts, Which permission you will set in AndroidManifest.xml
file if you are using ContentProvider.
A) FIND_CONTACTS
B) GET_CONTACTS
C) READ_CONTACTS
D) None of the above.
ANSWER: C
Q.4 SimpleCursorAdapter object maps a cursor to which view, defined in your XML file?
A) TextViews
B) ImageViews
C) Both A and B option are correct.
D) None of the above.
ANSWER: C
Q.5 What are the predefined query string constants available in Android?
A) ContactsContract.Contacts.CONTENT_URI
B) Browser.SEARCHES_URI
C) MediaStore.Images.Media.INTERNAL_CONTENT_URI
D) All of the above.
ANSWER: D
Q.6 Choose the correct option according to the given option.
Statement 1: A content provider behaves very much like a database — you can query it,
edit its content, as well as add or delete content.
Statement 2: Content providers let you centralize content in one place and have many
different applications access it as needed.
Statement 3: A content provider does not provide the facility to centralize content.
A) Only option 1 is correct.
B) Only option 2 is correct.
C) Option 1 and 2 are correct.
D) Option 1 and 3 are correct.
ANSWER: C
Q.7 For Creating your own content provider which class you will inherit?
A) Content
B) ContentProvider
C) Object.
D) None of the above.
ANSWER: B
Q.8 What is Android Interface Definition Language (AIDL)?
A) AIDL does not the Java programming language.
B) It does not define the programming interface.
C) It defines the programming interface that both the client and service agree upon in order to communicate with
each other using inter process communication (IPC).
D) None of the above.
ANSWER: C
Android Activity and Intents - questions and answers
Q.1 Choose the correct option regarding activity in android.
A) An activity is a window that contains the user interface of your application.
B) An application can have zero or more activities.
C) An application can have only one activity.
D) Option A and B are correct.
ANSWER: D
Q.2 Suppose that there are two activities in an application named ActivityOne and ActivityTwo. You want
to invoke ActivityTwo from ActivityOne. What code you will write?
A) Intent intent=new Intent (this, ActivityTwo.class);
startActivity(intent);
B) startActivity(new Intent(this, ActivityTwo.class));
C) Option A and B are correct.
D) None of the above.
ANSWER: C
Q.3 What is the permission for using the camera?
A. android.permission.USE_CAMERA
B. android.permission.CAMERA
C. android.permission.hardware.CAMERA
D) None of the above.
ANSWER: B
Q.4 The Log class supports which log types?
A) Error
B) Warning
C) Debug
D) All of the above.
ANSWER: D
Q.5 If you need to pass data back from an activity, Which method you should use?
A) startActivity()
B) startActivityForResult()
C) ActivityForResult()
D) None of the above.
ANSWER: B
Q.6 If you want to navigate from one activity to another then android provides you which class?
A) Object
B) startActivity
C) Intent
D) None of the above.
ANSWER: C
Q.7 The types of intents in android is\are
A) Explicit intents
B) Implicit intents
C) Start intents
D) Option A and B are correct.
ANSWER: D
Q.8 In android mini-activities are also known as.
A) Adapter
B) Activity
C) Fragments
D) None of the above.
ANSWER: C
Q.9 How will you reference a textbox control in java file, that is available in XML file and the ID is
txtName.
A) EditText txtEmpName;
txtEmpName=findViewById(R.id.txtName);
B) EditText txtEmpName;
txtEmpName=(EditText)findViewById(R.id.txtName);
C) EditText txtEmpName;
txtEmpName=(EditText)findViewById(txtName);
D) None of the above.
ANSWER: B
Q.10 Suppose that there are two activities in an application named FirstActivity and SecondActivity. You
want to send website name from ActivityOne to ActivityTwo. What code you will write? Suppose that
website name is “CareerRide.com”
A) Intent intent=new Intent (this, SecondActivity.class);
intent.putExtra("name", “CareerRide.com”);
startActivity(intent);
B) Intent intent=new Intent (this, SecondActivity.class);
intent.putExtra( “CareerRide.com”);
startActivity(intent);
C) Intent intent=new Intent ();
intent.putExtra("name", “CareerRide.com”);
startActivity(intent);
D) None of the above.
ANSWER: A
Q.11 How will you get the data in secondActivity? Refer question 10.
A) Intent intent=new Intent;
String str= intent.getStringExtra("name");
Toast.makeText(this, str , Toast.LENGTH_LONG).show();
B) Intent intent=getIntent();
String str= intent.getStringExtra("name");
Toast.makeText(this, str , Toast.LENGTH_LONG).show();
C) Intent intent=getIntent();
String str= intent.getText("name");
Toast.makeText(this, str , Toast.LENGTH_LONG).show();
D) None of the above.
ANSWER: B
Q.12 For creating Fragments the java class needs to extend which base class?
A) MainActivity
B) MiniActivity
C) Fragment
D) None of the above.
ANSWER: C
Introduction of Android - questions and answers
Q.1 What is the use of versionCode attribute in AndroidManifest.xml file?
A) It is used to define the current application version.
B) It is used to define the current application name.
C) It is used to define the public version that will be displayed to users.
D) None of the above.
ANSWER: A
Q.2 Android is open source true or false?
A) True
B) False
ANSWER: A
Q.3 What is used by android for relational data storage?
A) Tomcat
B) SQL
C) SQLiteDatabase
D) None of the above.
ANSWER: C
Q.4 What is true about an Android Virtual Device (AVD)?
A) An AVD is an emulator instance that enables you to model an actual device.
B) You can create more than one AVDs in order to test your applications with several different configurations.
C) You cannot create more than one AVDs.
D) Option A and B are correct.
ANSWER: D
Q.5 In which file, permissions are set in Android?
A) Src
B) AndroidManifest.xml
C) Bin
D) None of the above.
ANSWER: B
Q.6 In which file, all string constant should be stored in android?
A) AndroidManifest.xml
B) Bin
C) strings.xml
D) None of the above.
ANSWER: C
Q.7 Which virtual machine is used by Android to run application?
A) JVM
B) Dalvik VM
C) AVD
D) None of the above.
ANSWER: B
Q.8 What is the full form of DDMS?
A) Dalvik Debug Monitoring Service
B) Dalvik Design Monitoring Service
C) Direct Debug Monitoring Service
D) None of the above.
ANSWER: A
Q.9 Choose the correct option regarding activity in android.
A) Activity is a class.
B) When you create an android application your activity (class) is, by default inherited from Activity class.
C) Option A and B are correct.
D) None of the above.
ANSWER: C
Q.10 In Android, visual components are called.
A) Views
B) Components
C) DLL
D) None of the above.
ANSWER: A
Q.11 Which tool is used to monitor and control the Emulators on which you are debugging your
applications.
A) Android Asset Packaging Tool (AAPT)
B) Dx
C) DDMS
D) None of the above.
ANSWER: C