"Android Mobile Application Basic Tutorial (Android Studio) (2nd Edition)" [textbook objective questions] + [Learning Pass 2023 Spring] [reference answer]

Chaoxing Learning Pass intelligent terminal software development (based on Android Studio environment) chapter homework (39)

Chaoxing Learning Pass intelligent terminal software development (based on Android Studio environment) chapter homework (39)

one

1. With the development of smart phones, mobile communication technology is also constantly upgrading, currently the most widely used are
A, 1G
B, 2G
C, 3G
D、4G

2. The command to start the emulator (Android Virtual Device) in android is ()
A, adb
B, android
C, avd
D、emulator

3. The command to complete the mutual copying of emulator files and computer files and install applications in android is ()
A、adb
B、android
C、avd
D、emulator

4. Among the common commands of ADB, the command "list all devices" is
A, adb uninstall
B, adb install
C、adb device
D、adb emulator -avd

5. Which of the following is not a mobile operating system?
A, Android
B, Window Mobile
C, Apple IPhone IOS
D、windows vista

6. Which of the following statements about the origin of Android is wrong
A. Android 1.5 is called donut
B. Android is the first open system truly built for mobile phones
C. Android originally means "robot"
D. Android was originally developed by Andy Rubin

7. When creating an Android project, the icon of the project is set in the () file.
A、AndroidManifest.xml
B、string.xml
C、main.xml
D、project.properties

8. The suffixes of the files running in the AndroidVM virtual machine are
A, class
B, apk
C、dex
D、xml

9. Which is the VM virtual machine of Android?
A、Dalvik
B、JVM
C、KVM
D、framework

10. The application software installed in the android system is () format
A, exe
B, java
C、apk
D、jar

11. The bottom layer of the android system is built on the () operating system
A, Java
B, UNIX
C, Windows
D、Linux

12. In the following description about the directory structure of Android applications, which one is incorrect?
A. The src directory is the main directory of the application program, which is composed of Java class files.
B. The assets directory is the original resource directory, and the contents in this directory will be It will not be referenced by the R class
C. The res directory is an application resource directory, and all resource content in this directory will be indexed by the R class
D. The AndroidManifest.xml file is an application directory manifest file, which is automatically generated by ADT and does not require manual modification by programmers

13. The Android system is developed by 【 】
A. Andy Rubin
B. Larry Page
C. Sergey Brin

14. What is the function of the assets directory under the Android project?
A. Place the image resources used in the application. Res/drawable
B. Mainly place some file resources, these files will be packaged into the apk intact
C. Place strings, colors, arrays and other constant data res/values
​​D. Place some layout files corresponding to the UI, all of which are xml files res/layout

15. The application layer is a collection of core applications, mainly including
A, activity manager
B. SMS program
C. Audio driver
D. Dalivik virtual machine

16. Regarding the Dalvik virtual machine, the wrong statement is
A. Register-based architecture
B. Stack-based architecture
C. Load data in .dex format
D. Run on linux operating system

17. Android Studio is an Android development environment provided by [ ]
A, Microsoft
B. Google
C、ARM

18. Which of the following options does not belong to the Android architecture is yes.
A. Application layer
B. Application framework layer
C. Core class library
D、WindowManager

19. When creating a program, fill in the Application Name to indicate
A. Application name
B. Project name
C. Project package name
D. Class name

20. The Dalvik virtual machine is based on the () architecture.
A, stack
B, heap
C. Register
D. memory

21. The correct statement about the res/raw directory is
A. The files here are stored intact on the device and will not be converted into a binary format.
B. The files here are stored intact on the device and will be converted to a binary format.
C. The files here are finally stored in the specified package in binary format.
D. The files here are not stored in binary format in the end. in the specified package

22. Which of the following descriptions about 3G is wrong.
A. Refers to the mobile communication system that combines wireless communication with multimedia communication such as the Internet.
B. It can handle various media forms such as images, music, and video streams.
C. Compared with the previous two generations of communication technology, 3G has not improved the speed of transmitting voice and data.
D. 3G is the most popular communication technology today.

23.ADT Bundle contains three important components, namely
A、Eclipse
B、SDK
C、SDK Manager,exe

D、ADB

24. The Android system adopts a layered architecture, from high to low are [ ], [ ] [ ], [ ] kernels.
A. Application layer
B. Application framework layer
C. Core class library
D. Linux kernel

25.Android is actually a mobile phone. ×
26.WCDMA is a 3G standard customized by China itself, which is the standard used by China Mobile. ×
27. The first version of android, Android 1.1, was released in September 2008.
28. The gen directory is automatically generated, mainly including a R.java file, which can be modified manually. ×
29. The AndroidManifest.xml file is the configuration file of the entire program.
30. The fourth generation of mobile communication technology (4G) includes TD-LTE and FDD-LTE.
31. All Android applications correspond to the same Dalvik virtual machine instance at the bottom layer, and its code can be executed in the parsing of the virtual machine. ×
32. Android is an operating system for mobile phones and tablets developed by Google based on the Linux platform.
33. The Android Studio development tool does not have any requirements for the installation environment. x

two

1. Grid layout is a new layout of Android( ).
A, 3
B, 3.1
C, 3.2
D、4

2. The layout files in Android are located in the [ ] directory.
A、res/layout
B、res/raw

3. How to center a control in a relative layout ( )
A, android:gravity="center"
B、android:layout_gravity=“center”
C、android:layout_centerInParent=“true”
D、android:scaleType=“center”

4. The following ( ) attributes can be used as the prompt information of the EditText edit box
A, android:inputType
B, android:text
C, android:digits
D、day: hint

5. In the relative layout, "whether it is aligned with the bottom of the parent layout" is the attribute ( )
A, android:layout_alignBottom
B、android:layout_alignParentBottom
C、android:layout_alignBaseline
D、android:layout_below

6. Among the following properties, the ( ) property can be "on the left of the specified control".
A. android:layout_alignLeft
B. android:layout_alignParentLeft
C. androif:layout_left
D、android:layout_toLeftof

7. In the relative layout, when setting the following attributes, the attribute value can only be true or false ( )
A, android:layout_below
B、android: layout_alignParentLeft
C、android:layout_alignBottom
D、android:layout_ toRightof

8. Among the following options, set a control in the GridLayout to occupy 3 lines ( ).
A. android:rowSpan="3"
B、android:layout_rowSpan=“3”
C、android:layout_columnSpan=“3”
D、android:layout_column=“3”

9. Which of the following descriptions about the length/size units commonly used in Android layout files is incorrect? ( )
A, dp are device-independent pixels, independent of devices, and are the most commonly used length units
B, sp represents enlarged pixels, Mainly used for font size display
C. px is a pixel unit, and the display effect is the same on different devices, so it is recommended to use this unit in the layout
D. When setting relative distances such as space length, it is recommended to use the dp unit, which changes with the device density

10. The following does not belong to the android layout is ___ ( )
A, FrameLayout
B, LinearLayout
C、BorderLayout
D、TableLayout

11. For the view control in the XML layout file, what is the attribute value of the layout_width attribute? ( )
A, match_parent
B, fill_parent
C, wrap_content
D、match_content

12. Among the following options, the attribute to set the direction of the linear layout is ( ).
A、orientation
B、gravity
C、layout_gravity
D、padding

13. Which of the following options does not belong to the predefined layout methods in Android? ( )
A、TabLayout
B、RelativeLayout
C、AbsoluteLayout
D、LinearLayout

14. In Android UI development, the stretchColumns property of TableLayout indicates ( ).
A, the number of columns of TableLayout
B, the number of rows of TableLayout
C, the maximum number of columns that TableLayout can add
D. Stretch the specified column to fill the TableLayout

15.【 】control is used to display text information.
A、TextView
B、EditText

16. The function of the android:layout_column attribute in the table layout is to specify ( ).
A. Number of lines
B. Number of columns
C, the total number of rows
D, the total number of columns

17. In the table layout, the correct way to set a certain column to be expandable is ( )
A. Set the attributes of TableLayout: android:stretchcolumns="x", where x represents the serial number of the column
B. Set the attribute of TableLayout: androld:shrinkcolumns="x", x represents the serial number of the column C) Set the attribute of the specific column: android:stretchable="true" C. Set the attribute of the specific column: android:stretchable="true
"
D. Set the attributes of specific columns: androld:shrinkable="true"

18. There is a button (Button) in the layout file. If you want the button to be displayed in the center of its parent container, the correct way is: ( )
A. Set the attribute of the button: android:layout_gravity="center"
B. Set the attribute of the button android:gravity="center"
C. Set the attribute of the button parent container: android:layout_gravity="center"
D. Set the attribute of the button parent container: androld:gravltyt="center"

19. In addition to the menu in the Android interface, [ ] is also a way for the program to interact with the user.
A. Icon
B. dialog box

20. The layout of the scratch game in actual development is written according to ( ).
A. Relative layout
B. Linear layout
C. Frame layout
D. Absolute layout

21. Assuming that the screen width of the mobile phone is 400px, now adopt a horizontal linear layout to place 5 buttons, and set the width of each button to 100px, then when the program is running, the interface display effect will be ( ) A. Automatically add a horizontal scroll bar,
drag Move the scroll bar to view 5 buttons
B. Only 4 buttons can be seen, and the part beyond the screen width cannot be displayed
C. The width of the button is automatically reduced, and 5 buttons can be seen.
D. The program runs incorrectly and cannot be displayed

22. The following subclasses of View are ( )
A, Activity
B, Service
C、ViewGroup
D、TextView

23. In main.xml, when defining a component, there are two attributes that must be written ( )
A、android:layout_width
B、android:layout_height

C、android:id=“@+id/start”
D、android:text

24. The common layout methods in Android are【 】.
A、LinearLayout
B、RelativeLayout
C、FrameLayout
D、TableLayout
E、AbsoluteLayout

25. Linear layout uses【 】to display the controls in the interface.
A, horizontal
B, vertical

26. Regarding the subject, the correct one is ( )
A. It is a collection of attributes
B. It can be set in the program
C. It is usually used for an Activity or all Activities

D. It can be used on a single TextView

27. The android:layout_alignRight attribute in the relative layout means "on the left of the specified control". ×
28. The function of Toast is to display some prompt information.
29.Table Row must set the layout_width and layout_height attributes. ×
30. Multiple controls can be added to the frame layout, and these controls will overlap and display in the upper left corner of the screen.
31. Internationalization is not supported in Android programs. ×
32. The controls in the relative layout are placed according to the relative position.
33.RadioButton is a radio button and needs to be used in conjunction with RadioGroup.
34. In Android UI development, the linear layout is displayed vertically by default. ×
35.TableLayout can arrange views in rows and columns.
36. The frame layout is displayed frame by frame on the interface.

three

1. Among the following options, the method of setting the maximum progress of the ProgressBar is ( )
A、setMax()
B、setProgress()
C、setCurrentProgress ()
D、setTotalProgress()

2. An application will contain ( ) activities by default.
A、1
B、2
C、3
D、4

3. Among the following components, the one that cannot be started with Intent is ().
A. Activity
B. Start service
C. Broadcast
D. Content provider

4. The following description about Activity is wrong ( )
A. Activity is one of the four major components of Android
B. Activity has 4 startup modes
C. Activity is usually used to start a broadcast event
D. Activity is like an interface administrator, and the user's operations on the interface are managed through Activity

5. Which is correct about implicit Intent? ( )
A. IntentFilter is used in android to find objects related to implicit Intent
B. Find the object associated with the intent by the name of the component
C. Implicit Intent is more used to pass messages within the application
D. A component that declares IntentFilter can only respond to implicit Intent requests

6. In the description of common events about view controls, which one is incorrect? ( )
A. The Click event can only be used on the button, indicating the click action of the button
B. When the TextView class view control loses or gains focus, the FocusChange event will be triggered.
C. When an option in the radio button is selected, the CheckedChange event will be triggered
. D. When an option in the multi-selection box is selected, will trigger the CheckedChange event

7. The following method to exit the Activity error is? ( )
A, finish ()
B、System.exit()
C. onStop()
D. Forced exit by throwing an exception

8. In Android, () is usually used to pass data.
A、intent
B、Activtiy
C、broardcast
D、service

9. () is one of the four major components in the Android program, providing users with a visual interface and operations.
A. intent
B、Activtiy
C、broardcast
D、service

10. () is called intent, which is an important way for the components in the program to interact
A、intent
B、Activtiy
C、broardcast
D、service

11. Among the following methods, the Activity will not be executed from startup to shutdown ( ).
A. onCreate()
B. onStart()
C. onResume()
D、onRestart()

12. Among the following options, the method to execute when reopening the minimized Activity interface is ( ).
A、onRestart、onResume
B、onCreate、onStart
C、onRestart、onStart
D、OnPause、 onDestroy

13. Which of the following does not belong to the life cycle method of Activity ( )
A、onStart
B、onPause
C、onCreate
D、onResume

14. It is best to save some resources and state operations in which function in the Activity life cycle? ( )
A、onStart
B、onPause
C、onCreate
D、onResume

15. Among the following options, the execution method when the Activity gets the focus is ( )
A, onStart()
B, onResume()
C、onPause()
D、onDestroy()

16. In the life cycle of the Activity, when it changes from the visible state to the translucent state, which method of it must be called? ( ) A
, onStop()
B、onPause()
C、onRestart()
D、onStart()

17. The following are not onActivityResult() method parameters are ( )
A, requestCode
B, resultCode
C, data
D、result

18. The startActivityForResult() method receives two parameters, the first is Intent, and the second is ( ).
A. resultCode
B. requestCode
C. Request code
D、data

19. When Intent transfers data, which of the following types of data cannot be transferred? ( )
A, Serializable
B. JSON object
C、Bundle
D、charsequence

20. What are the following functions of Intent in android? ( )
A. Handle the overall work of an application
B. It is a long life cycle. A program without a user interface can keep the application running in the background without being affected by Switch pages and disappear
C. Realize data sharing between applications
D. It can realize switching between interfaces, can contain actions and action data, and is the link connecting the four major components

21. Android uses () to manage instances of Activity.
A. Task stack
B. Task pile
C. Queue
D. Task column

22. How android organizes Activity ( )
A. Component Activity in the form of a stack
B. Organize Activity C in a queue
, organize Activity D in a tree
, and organize Activities in a chain.

23. In android, Intent object is used to transfer information ( )
A. In android, Intent object is used to transfer information
B. Intent object can transfer value to broadcast or Activity
C. When using Intent to transfer value, Some value types can be passed
D. When using Intent to pass values, its key value can be an object

24. The ( ), ( ), and ( ) methods will be executed when the interface of the Activity is opened.
A、onCreate()
B、onStart()
C、onResume()

D、onRestart()

25. The startup mode of Activity includes ().
A、standard
B、singleTop
C、singleTask
D、singleInstance

26. Intent can be divided into ( )
A. Explicit intent
B. Implicit intent

C. Component intent
D. Class intent

27. The following states belonging to Activity are ( )
A. Suspended state
B. Running state

C. to sleep
D. stop state

28.Activity is one of the four major components of Android applications.
29. Intent is generally only used to start the Activity and cannot start the broadcast and service. ×
30. Intent can be used to open Activity, and it can also be used to transfer data between Activities.
31. The default startup mode of Activity is singleTop mode. ×
32. During data transfer, if you need to get the returned data, you need to use the onActivityResult() method.
33.Activity must be registered in the AndroidManifest.xml file to run.
34. Use the Intent to transfer data, just call the putExtra() method to store the data you want to store in the Intent.
35. Objects of Parcelable type cannot be passed using Intent. ×
36. The action used to start the system camera is android.media.action.VIDEO_CAPTURE. ×
37. In the target Activity, usually use the setResult() method to set the return data.

Four

1. Among the following file operation permissions, the content of the specified file can be added ( )
A, MODE_PRIVATE
B, MODE_WORLD_READBLE
C、MODE_APPEND
D、MODE_WORLD_WRITEABLE

2. In the following codes, the method used to obtain the SD card path is ( )
A. Environment.getSD();
B. Environment.getExternalStorageState();
C. Environment.getSD Directory();
D、Environment.getExternalStorageDirectory();

3. Among the following options, the statement about file storage data is wrong ( )
A. File storage is to operate data in the form of stream
B. File storage can store data in SD card
C. File storage can store data into memory
D. Android can only use files to store data

4. If you want to share the private data in the program with other applications, you can use ( )
A, file storage
B, SharedPreferences
C、ContentProvider
D、SQLite

5. "The file operation mode in android means that it can only be used by this application, which one will be overwritten when writing the file? ( )
A, MODE_APPEND
B, MODE_WORLD_READABLE
C, MODE_WORLD_WRITEABLE
D、MODE_PRIVATE

6. SharedPreference data is saved in the mobile phone in the format of _____________.
A、XML
B, txt
C, Json
D, according to user definition

7. Which of the following statements about saving and fetching files in SharedPreferences is incorrect: ( )
A. It belongs to the mobile storage solution
B. SharePreferences deals with key-value pairs
C. The path to read the xml file is /sdcard/shared_prefs/
D. The data storage format is xml

8. The data type stored in SharedPreferences does not support ( )
A, boolean
B, int
C, String
D、double

9. The correct one for SharedPreferences is ( )
A. SharedPreferences pref = new SharedPreferences();
B. Editor editor = new Editor();
C. SharedPreferences objects are used to read and store common data types
D. The editor object must call the commit() method at the end to store data.

10. The path and extension of SharedPreferences saved files are? ( )
A, /data/data/shared_prefs/*.txt
B、/data/data/package name/shared_prefs/ *.xml
C. /mnt/sdcard/Specify the folder and specify the extension
D. Arbitrary path

11. For an existing SharedPreferences object setting, if you want to store a string "person" in it, what method should the setting call first ( )
A、edit()
B、save()
C、commit()
D、putString()

12. Regarding JSON and XML, the error is ( )
A. The speed of JSON is much faster than that of XML
B. JSON is more descriptive of data than XML
C. Compared with XML, JSON has smaller data size.
D. JSON and XML also have rich analysis methods.

13. If you want to store a key-value pair string, which class should you use? ( )
A, ContentResolver
B、SharedPreferences
C、Resources
D、Resources

14. When using files to store data, the files are stored in the () directory of the software.
A. /data/data/package name/files/
B. /data/data//files/
C. mnt/sdcard/package name/files/
D. Any path

15. Use the () method in the Activity to open the output stream object of the /data/data/package name/files/a.txt file.
A. openFileInput()
B、openFileOutput()
C、FileOutput()
D、FileInput()

16. The directory corresponding to storing data in the SD card in Android is ()
A, /data/data/package name/files/
B, /mnt/sdcard/files/
C、/mnt/sdcard
D. Any path

17. Among the following options, the five storage data methods in Android do not include ( ).
A. File
B. SQLite database
C. SharedPreferences
D、Map

18. Among the following options, the description about XML serialization and parsing is reasonable ( )
A. DOM parsing will store all the content of the XML file in memory in the form of a document tree
B. When serializing objects, you need to use the XmlSerialize serializer, that is, the XmlSerializer class

C. The startDocument() method of the XmlSerializer class is used to write the start node of the serial number
D. The setOutput() method of the XmlSerializer class is used to set the encoding method of the file

19. What are the ways of Android data storage and access? ()
A, sharedpreference
B, database
C, file
D, content provider
E, network storage

20. Which of the following directories can data be stored in Android ( )
Disk A, Disk C
B. SD card directory
C. Under /data/data/ package name

D, D drive

21.SharedPreferences is essentially an XML file, which is stored in the file in the form of Map.
22. File storage is to store the data intact in the document through the form of I/O stream.
23.XML files can only be used to save local data and cannot be transmitted in the network. ×
24.ContentProvider means the content provider, which is used to display the data in the program. ×
25. When the user saves the file to the SD card, the permission "android.permission.WRITE_EXTERNAL_STORAGE" needs to be added to the manifest file.
26. SharedPreferences saves the data in the XML file in the form of Key/Value.
27. When storing data in Android, you can use SQL Server database. ×
28.Data in Android can only be stored on the SD card. ×
29. The cache data of the software can be cached in the /data/data/package name/cache directory, and the data will be deleted when the cache is cleared.
30. There is only one way of data storage in Android. ×
31. When the openFileOutput(String name, int mode) method is used in Android to obtain the file output stream, there are 4 commonly used modes for the second parameter mode.

five

1. The database used in Android is ()
A、SQLite
B、SQL Server
C、MySQL
D、Oracel

2. When using the construction method of SQLiteOpenHelper to create a connection with the database, the parameters that can be set to null are
A, Context
B, database name
==C, CursorFactory==
D, database version

3. The correct way to start a transaction in Android is ( ).
A. db. startTransaction()
B、db.beginTransaction()
C、db.endTransaction()
D、intent.startTransaction()

4. Define a data adapter MyAdatper, the class that needs to be inherited is ( ).
A. DefaultAdapter
B. ParentAdapter
C、BaseAdapter
D、BasicAdapter

5. When using the SQLiteOpenHelper class, which method is used to implement version upgrades
A, onCreate()
B, onCreade()
C, onUpdate()
D、onUpgrade()

6. Among the following options, the method used to fill the ListView with data is ( ).
A、setAdapter()
B、setDefaultAdapter()
C、setBaseAdapter()
D、setView()

7. Among the following commands, the commands belonging to SQLite are
A, shell
B, push
C、quit
D、keytool

8. Regarding the Sqlite database, the incorrect statement is that
A, the SqliteOpenHelper class is mainly used to create and update the database
B, and the SqliteDatabase class is used to operate the database
C. Every time the getWritableDatabase() method of SqliteDatabase is called, the onCreate method of SqliteOpenHelper will be executed.
D. When the database version changes, the database structure can be automatically updated

9. In the following options, the method used to query data is ( ).
A. update()
B. insert()
C、query()
D、delete()

10. The function of getCount( ) method in BaseAdapter is ( ).
A. Return the number of an item in the ListView
B. Return the number of items displayed by the ListView

11. In Android, you need to use () to fill the ListView with data.
A. Data adapter
B、OpenHelper

12. Which statement about the ContenValues ​​class is correct?
A. It is similar to Hashtable. It is also responsible for storing some name-value pairs, but the name of the name-value pairs it stores is of String type, and the values ​​​​are all basic types.
B. It is similar to Hashtable. It is also responsible for storing some name-value pairs, but the names in the name-value pairs it stores are of any type, and the values ​​are all basic types.

13. The correct statement about the adapter is
A. It is mainly used to store data
B. It is mainly used to bind data to components

14. The correct statement about the adapter is
A. It is mainly used to store data
B. It is mainly used to bind data to components
C. It is mainly used to store XML data
D. It is mainly used to parse data

15. Among the following descriptions about the use of ListView, the incorrect one is
A. To use ListView, you must use the Adpater method to transfer data for the ListView
B. To use ListView, the Activity corresponding to the layout file must inherit ListActivity
C. The view layout of each item in the ListView can use either the built-in layout or a custom layout.
D. When each item in the ListView is selected, the ItemClick event of the ListView object will be triggered

16. When using the auxiliary class SQLiteOpenHelper in android, what operations may generate a database
A、getWriteableDatabase()
B、getReadableDatabase()

C、getDatabase()
D、getAbleDatabase()

17. Use the SQLiteOpenHelper class to generate a database and manage the database version.
A. getDatabase()
B、getWriteableDatabase()
C、getReadableDatabase()

D、getAbleDatabase()

18. After using the SQLite database to query, the operations that must be done are
A. Close the database
B. Exit directly
C. Close Cursor
D. Use the quit function to exit

19. Android data storage and access methods include
A, file
B, database
C, sharedpreference
D, content provider

E. Internet

20. ( ) and ( ) controls display data content in the form of a list.
My answer:
first empty:
ListView
second empty:
not sure

21. The SQLite database does not need to be closed after use, and does not affect program performance. ×
22. It is best to use the ArrayAdapter adapter when using ListView to display more complex data. ×
23.SQLite not only supports Android API but also supports SQL statements for adding, deleting, modifying and checking operations.
24. Use the BaseAdapter to control how many pieces of data the ListView displays through the getView() method. ×
25.SQLite only supports 5 data types including NULL, INTEGER, REAL, TEXT and BLOB. ×
26. A transaction is a unit that performs work on a database, and is a set of operations on a database.
27. The ListView control in Android displays the same data as TextView. ×
28. Regarding the operation of the database in Android, the SQLiteOpenHelper class is used to operate the database. ×
29. Use the execSQL() method of SQLiteDatabase to realize the operation of adding, deleting, and modifying database tables.
30.ListView is usually used to display a vertically scrolling list on the interface.
31. When customizing the data adapter class, the inherited parent class is DefaultAdapter. x

six

1. In the manifest file, the nodes used when registering broadcast are
A, activity
B, broadcast
C、receiver
D、broadcastreceiver

2. What permissions need to be configured in the manifest file to register a broadcast event of SMS arrival ( ).
A. uses-permission android:name="android.permission.SMS"
B. uses-permission android:name="android.permission.SEND_SMS"
C、uses-permission android:name=“android.permission.RECEIVE_SMS”
D、uses-permission android:name=“android.permission.RECEIVE_SEND_SMS”

3. Ordered broadcasts can be intercepted by the following ( ) methods.
A. abort( )
B. abortReceiver()
C. abortReceiver()
D、abortBroadcast()

4. The () method can be used to intercept ordered broadcasts and terminate broadcasts.
A、abortBroadcast()
B、BroadCastReboot ()

5. The broadcast receiver defined in Android must be inherited ( ).
A、BroadcastReceiver
B、BroadCast
C、Receiver
D、BroadCastReboot

6. Inheriting BroadcastReceiver will rewrite the () method.
A、onReceiver()
B、onUpdate()
C、onCreate()
D、onStart()

7. The method used to send ordered broadcasts is ( ).
A、sendOrderedBroadcast()
B、sendBroadcast()
C、Broadcast()
D、sendData()


8. Among the following methods, A and startBroadcastReceiver() are used to send an ordered broadcast
B、sendOrderedBroadcast()
C、sendBroadcast()
D、sendReceiver()

9. The correct statement about the sendBroadcast() method is ( ).
A. The method is to send an ordered broadcast
B. The method is to send an out-of-order broadcast
C. This method can send ordered broadcasts as well as out-of-order broadcasts.
D. The above statements are incorrect

10. Broadcasting is a mechanism used between ( ) applications.
A. Share data
B. Store messages
C. Push data
D. to send a message

11. The life cycle of a dynamically registered broadcast receiver depends on the () component.
A. Receive broadcast
B. Send broadcast
C. Register broadcast
D、Activity

12. The incorrect statement about BroadcastReceiver is
A. It is used to receive broadcast Intent
B. A broadcast Intent can only be received by a BroadcastReceiver that subscribes to the broadcast
C. For ordered broadcasting, the system will execute the receivers one by one according to the priority level declared by the receiver.
D. The priority level of the receiver's life is set in the android:priority attribute, and the greater the value, the higher the priority level

13. Regarding the role of broadcasting, which statement is correct
A. It is mainly used to receive some messages released by the system
B. It can perform time-consuming operations
C. It can start an Activity
D. It can help the Activity modify the user interface

14. The statement about ordered broadcast and disordered broadcast is correct ( ).
A. Ordered broadcasts can be intercepted and data can be modified, while disordered broadcasts cannot be intercepted and data cannot be modified.
B. Ordered broadcasts are similar to disordered broadcasts.
C. Orderly broadcasts cannot be intercepted.
D. The out-of-order broadcast is sent according to the priority.

15. There are two types of broadcasting, one is ( ) broadcasting and the other is ( ) broadcasting.
A. public
B. private
C. ordered
D. disordered

16. The code register broadcast needs to call the registerReceiver() method.
17. The broadcast event of SMS arrival in the registration system does not require the permission to receive SMS. ×
18. Both ordered and disordered broadcasts can be intercepted. ×
19. The attribute corresponding to the orderly broadcast configuration priority is property.
20. Sending a custom broadcast can be sent through the sendbroadCast() method.
21. Each broadcast can only be received by one broadcast receiver. ×
22. The broadcast receiver is one of the four major components and must be registered in the manifest file.
23. The registration information of broadcast receivers must be unique. ×
24. Time-consuming and complex services can be processed in the BroadcastReceiver and onReceiver methods. ×
25. The broadcast receiver must be closed manually after registration. x

seven

  1. The wrong description about AIDL is ( ).
    A. The full name of AIDL is Android Interface Definition Language.
    B. The purpose of AIDL is to solve inter-process communication.
    C. The source code of the interface defined by AIDL must end with .aidl.
    D. The AIDL language is the evolution of the Java language.

  2. The wrong statement about service creation is ( ).
    A. To create a service in Android, you need to inherit the Service class.
    B. Services in Android need to be configured in the manifest file.
    C. A service in Android can be understood as an activity that runs in the background and has no interface.
    D. What the service in Android can do can be replaced by opening a sub-thread.

  3. The ( ) method is called every time the service is started.
    A. onCreate()
    B. onStart()
    C. onResume
    D、onStartCommand

  4. Open the service through bindService, and the service life cycle is ( ).
    A. onCreate()àonStart()àonBind()àonDestroy()
    B. onCreate()àonBind()àonDestroy()
    C、onCreate()ānBind()àoonUnBind()àoonDestroy()
    D、onCreate()ònStart()ònBind()ÂonUnBind()ÂonDestroy()

  5. Among the following methods, the ones that do not belong to the Service life cycle are
    A, onResume()
    B、onStart()
    C、onStop()
    D、onDestory()

  6. Use the startService() method to start the service, and the ( ) method will definitely be called.
    A. onStart()
    B. onResume()
    C. onBind()
    D、onCreate()

  7. Android inter-process communication is achieved through ().
    A. Service
    B、AIDL
    C、Activity
    D、ContentProvider

  8. In Android, the control used to manage background services is ( ).
    A、Service
    B、Activity
    C、ContentProvider
    D、BroadCastReceiver

  9. Regarding the difference between Service and Thread, the incorrect one is ( ).
    A. The service runs by default in the main thread of the application process that declares it.
    B. Intensive computing or blocking operations can be performed in the service.
    C. You can create a Thread in Service.
    D. When there is a time-consuming or blocking operation, a thread should be created in it.

  10. Start the service with startService which of the following statements is correct ( ).
    A. The startService method starts the service. Once the service is started, the service will run in the background for a long time.
    B. After the service is started, the service can only be closed after the machine is shut down.
    C. The service does not need to be registered in the manifest file.
    D. onStop() will be called when the service stops.

  11. The service opened by the bindService() method can be unbound by the ( ) method.
    A、unbindService()
    B、onDestroy()
    C、onStop()
    D、onFinish()

  12. In Android, there are () way to start the service and () way to start the service.
    A. activeService
    B、startService()
    C、bindService()

    D、touchService

  13. What Service and Activity have in common is
    A. Both are one of the four major components
    B. Both have onResume() method
    C, can be called remotely
    D. You can customize the beautiful interface

  14. Regarding the onCreate() and onStart() methods of the Service life cycle, the correct statement is
    A. If the Service has started, the onCreate() and onStart() methods will be called successively
    B. When starting for the first time, the onCreate() and onStart() methods are called successively
    C. When starting for the first time, only the onCreate() method will be called
    D. If the Service has already started, only the onStart() method will be executed, and the onCreat() method will no longer be executed

  15. Among the following options, which belong to the characteristics of bound services are
    A. Open with the bindService() method
    B. The service is closed after the caller closes
    C. ServiceConnection must be implemented

    D. Use the stopService() method to shut down the service

  16. After the service is enabled by binding, the service will be closed when the interface is not visible. x

  17. Long, time-consuming operations can be handled in services.

  18. Services are not the four major components in Android, so they do not need to be registered in the manifest file. x

  19. After the service is opened in the binding mode, the service has nothing to do with the caller. x

  20. The interface of the service can be set up very beautifully. x

  21. Remote services refer to services running on Tomcat. x

  22. AIDL is used to solve inter-process communication problems.

  23. The life cycle of a service in Android is the same as that of an Activity. x

  24. Service is one of the four major components in Android.

  25. To create a service component in Android, you need to inherit the Service class.

textbook one

1. Dalvik is a virtual machine designed by Google for the Android platform. (√)
2. The main language of the Android application is Java. (√)
3. The Android system adopts a layered architecture, which is the application layer, the application framework layer, the core class library and the Linux kernel. (√)
4. The third-generation mobile communication technology (3G) includes TD-LTE and FDD-LTE. (×)
5. In the Android program, Log.e() is used to output warning level log information. (×)
6. Each Dalvik virtual machine instance is an independent process space, and each process cannot communicate with each other. (×)

1. The Dalvik virtual machine is based on () architecture.
A. stack
B. heap
C. Registers
D. memory

2. The theme and style resources in the Android project are usually placed in the () directory.
A. res/drawable
B. res/layout
C. res/values
D. assets

3. Among the following statements about the AndroidManifest.xml file, the error is ()
A. It is the configuration file of the entire program
B. You can configure the permissions required by the program in this file
C. You can register the program in this file s component
D. This file can set the UI layout

4. The Dalvik virtual machine belongs to () in the Android system architecture
A. Application layer
B. Application framework layer
C. Core class library layer
D. Linux kernel layer

5. Android text messages, contact management, browsers, etc. belong to the Android system architecture ()
A. Application layer
B. Application framework layer
C. Core class library layer
D. Linux kernel layer

textbook two

1. ViewGroup is a container for interface controls. (√)
2. If three buttons with the same properties are placed in FrameLayout, the first added button can be displayed on the screen. (×)
3. The layout files in Android are usually placed in the res/layout folder. (√)
4. TableLayout inherits from LinearLayout, so it fully supports the attributes supported by LinearLayout. (√)
5. The android:layout_weight attribute in the LinearLayout layout is used to set the weight of the controls in the layout. (√)

1. Among the following properties, the one used to set the linear layout direction is ()
A. orientation
B. gravity
C. layout_gravity
D. padding

2. Among the following options, the ones that do not belong to the Android layout are ()
A. FrameLayout
B. LinearLayout
C. Button
D. RelativeLayout

3. Frame layout FrameLayout is to put the components in it ()
A. Upper left corner
B. Top right
C. Bottom left
D. Bottom right

4. For XML layout files, the value of the android:layout_width attribute cannot be ()
A. match_parent
B. fill_parent
C. wrap_content
D. match_content

5. The following description about RelativeLayout is correct ()
A. RelativeLayout means absolute layout, which can customize the x and y position of the control
B. RelativeLayout means frame layout, which can realize the function of label switching
C. RelativeLayout represents a relative layout, where the positions of controls are relative positions
D. RelativeLayout represents the table layout, which needs to be used together with TableRow

textbook three

1. Android control style, each XML attribute corresponds to a Java method. (√)
2. When the android:checked attribute of the specified RadioButton button is true, it indicates the unchecked state. (×)
3. 3. The AlertDialog dialog box can directly create objects through the new keyword. (×)
4. 4. Toast is a lightweight information reminder mechanism provided by the Android system, which is used to prompt users for instant messages. (√)
5. 5. The data in the ListView list is loaded through the Adapter. (√)

1. A Button is defined in the XML layout, and the attribute that determines the text displayed on the Button button is ()
A. android:value
B. android:text
C. android:id
D. android:textvalue

2. Among the following options, () is used to set the size of the text displayed in the TextView.
A. android:textSize="18"
B. android:size="18"
C.android:textSize=“18sp”
D. android:size=“18sp”

3. When using the EditText control, when the text content is empty, if you want to make some prompts, the attributes you can use are ()
A.android:text
B.android:background
C.android:inputType
D. android:hint

4. In order for an ImageView to display a picture, the property that can be set is ()
A. android:src
B. android:background
C. android: img
D. android:value

5. Which of the following statements about ListView is correct? ()
A. ListView items cannot be set to click events
B. ListView can display data content without setting an Adapter
C. When the data exceeds the range that can be displayed, ListView automatically has the feature of scrolling
D. If the ListView can currently display 10 items and there are 100 items of data in total, 100 Views will be generated

6. The listener event of CheckBox being selected is usually used ()
A. setOnClickListener
B. setOnCheckedChangeListener
C.setOnMenultemSelectedListener
D.setOnCheckedListener

7. When using the EditText control, the property () method that can set the text box to display in multiple lines.
A. android:lines
B. android:layout_height
C. android:textcolor
D. android:textsize

8. The following description about AlertDialog is wrong ()
A. Use the new keyword to create an instance of AlertDialog
B. The display of the dialog box needs to call the show() method
C. The setPositiveButton() method is used to set the OK button
D. The setNegativeButton() method is used to set the Cancel button

textbook four

1. If the Activity does not set the startup mode, it defaults to standard. (√)
2. The life cycle methods of Fragment and Activity are consistent. (×)
3. If you want to close the current Activity, you can call the finish() method provided by the Activity. (√)
4. <intent-filter>There can only be one action attribute in the middle of the label. (×)
5. By default, the startup mode of the Activity is standard. (√)

1. Among the following options, the ones that do not belong to the four major components of Android are ()
A. Service
B. Activity
C. Handler
D. ContentProvider

2. Among the following descriptions about Activity management in Android, the correct one is ()
A. Android manages Activity in the form of a heap
B. Android manages Activity in the form of a stack
C. Android manages Activity in the form of tree
D. Android manages Activity in the form of linked list

3. Among the following options, () is not an Activity life cycle method.
A.onCreate()
B. startActivity()
C. onStart()
D.onResume()

4. Among the following methods, () is the method to start the Activity.
A. startActivity()
B. goToActivity()
C. startActivityResult()
D. All of the above

5. Which of the following descriptions about Intent is correct ()
A. Intent cannot realize data sharing between applications
B. Intent can realize interface switching, and can also directly transfer data between different components
C. Use explicit Intent without specifying the target component to jump to
D. Implicit Intent will not clearly indicate the target component that needs to be activated, so the data jump between components cannot be realized

textbook five

1. SQLite is a lightweight database that comes with Android and supports basic SQL syntax. (√)
2. The file storage method in Android is divided into internal storage method and external storage method. (√)
3. When using the openFileOutput() method to open the output stream of the application, you only need to specify the file name. (×)
4. When the Android SDK version is lower than 23, the application must add permissions to the manifest file if it wants to operate the SD card data. (√) 5. The update() method of the SQLiteDatabase class is used to delete the data in the database table. (×)
6. The transaction operation of SQLite database satisfies atomicity, consistency, isolation and persistence. (√)

1. In the following description about SharedPreferences accessing files, the error is ()
A. It belongs to the mobile storage solution
B. SharedPreferences deals with key-value pairs
C. The path to read xml is /sdcard/shared_prefs
D. The saving format of the text is xml

2. Among the following options, the file operation mode parameter that does not belong to the getSharedPreferences method is ()
A. Context.MODE_PRIVATE
B. Context.MODE_PUBLIC
C. Context.MODE_WORLD_READABLE
D. Context.MODE_WORLD_WRITEABLE

3. Among the following methods, the () method is the method for sharedPreferences to obtain its editor.
A. getEdit()
B. edit()
C. setEdit()
D. getAll()

4. When Android performs query operations on database tables, it will use () in the SQLiteDatabase class
A.insert()
B.edit()
C.query()
D.update()

5. In the following description about the SQLite database, the error is ()
A. The SqliteOpenHelper class has the function of creating a database and updating the database version
B. The SqliteDatabase class is used to operate the database
C. Every time the getWritableDatabase method of SqliteDatabase is called, the onCreate() method of SqliteOpenHelper will be executed
D. When the database version changes, the onUpgrade() method of SqliteOpenHelper will be called to update the database

6. Among the following codes for initializing SharedPreferences, the correct one is ()
A. SharedPreferences sp=new SharedPreferences();
B. SharedPrefe/rences sp=SharedPreferences.getDefault();
C. SharedPreferences sp=SharedPreferences.Factory();
D. SharedPreferences sp=getSharedPreferences();

Textbook Six (None)

textbook seven

1. Uri is mainly composed of three parts, namely scheme, authority and path. (√)
2. Content Observer ContentObserver is used to observe the change of the data represented by the specified URI. (√)
3. The main function of the content provider is to realize the function of sharing data across programs. (√)
4. When querying the content of the SMS database through the content parser in Android, it is not necessary to add the permission to read SMS. (×)
5. The UriMatcher class of the Android system is used to match Uri. (√)

1. If an application wants to access the database of another application, it needs to be implemented through ().
A. Broadcast Receiver
B. Activity
C. ContentProvider
D. AIDL

2. In the following methods, () can get the instance object of ContentResolver.
A. new ContentResolver ()
B. getContentResolver ()
C. newInstance ()
D. ContentUris.newInstance ()

3. When customizing the content observer, the class that needs to be inherited is ()
A. BaseObserver
B. ContentObserver
C. BasicObserver
D. DefalutObserver

4. When querying system information, the Uri corresponding to the content provider is ()
A. Contacts.Photos.CONTENT_URI
B. Contacts.People.CONTENT_URI
C. content: //sms/
D. Media.EXTERNAL_CONTENT_URI

5. The following description about ContentProvider is wrong ()
A. ContentProvider is an abstract class that can only be used after inheritance
B. ContentProvider can only be run after being registered in the AndroidManifest.xml file
C. ContentProvider provides a unified way of accessing the database
D. None of the above statements are true

textbook eight

1.Broadcast means broadcast, which is a mechanism for passing messages between applications. (√)
2. When registering broadcast receivers in the manifest file, you can use the priority attribute in the <intent-filter> tag to set the priority level. The larger the attribute value, the higher the priority. (√)
3. The broadcast efficiency of orderly broadcast is higher than that of disorderly broadcast. (×)
4. The life cycle of a dynamically registered broadcast receiver depends on the component that registered the broadcast. (√)
5. The broadcast receiver in Android must be registered in the manifest file. (×)

1. About the broadcast type, the wrong one is () (multiple choice)
A. The broadcast types in Android are divided into ordered broadcast and disorderly broadcast
B. Out-of-order broadcasts are received according to a certain priority
C. Out-of-order broadcasts can be intercepted and data can be modified

D. Ordered broadcasts are sent according to a certain priority

2. Broadcasting is used as a communication method between Android components, and the scenarios used are () (multiple choices)
A. Message communication within the same component within the same APP
B. Message communication between components of different APPs
C. Message communication between different components within the same APP (single process)
D. In the same APP Message communication between different components with multiple processes

textbook nine

1. The Service service runs in a child thread. (×)
2. No matter which method is used to start the Service, its life cycle is the same. (×)
3. When using the communication method of the service to communicate, it must be ensured that the service is opened in a binding manner, otherwise the communication will not be possible. (×)
4. A component can only bind one service. (×)
5. Both the remote service and the local service run in the same process. (×)

1. If the service is started by bindService, then the life cycle of the service is ()
A. onCreate()→onStart()→onBind()→onDestroy()
B. onCreate()→onBind()→onDestroy()
C.onCreate()→onBind()→onUnBind()→onDestroy()
D.onCreate()→onStart()→onBind()→onUnBind()→onDestroy()

2. In the following description about Service, the error is ()
A. Service has no user-visible interface and cannot interact with users
B. Service can be started through Context.startService()
C. Service can be started through Context.bindService( to start
D. Service does not need to be configured in the manifest file

3. The following method description about Service, the error is ()
A. onCreate() means the method executed when the service is created for the first time
B. The method executed when the startService() method is called to start the service is onStartCommand()
C. Call bindService The method executed when the () method starts the service is onBind()
D. The method executed when the startService() method is called to disconnect the service binding is onUnbind()

textbook ten

1. Sliding and popping operations are keyboard events. (×)
2. The processing model of event monitoring mainly includes event source, event and event listener. (√)
3. The onFocusChangedO method can be rewritten in the Activity. (×)
4. The events in Android mainly include keyboard events and touch events. (√)
5. In the Handler mechanism, Message means that it can carry information for transmission. (√)

1. Which of the following descriptions about methods related to the callback mechanism is correct () (multiple choice)
A. The onKeyDownO method is mainly used to capture the event that the mobile phone keyboard is pressed
B. The onKeyUpO method is mainly used to capture the event that the keyboard key is popped up
C. The onTouchEventO method is mainly used to handle the screen touch event
D. onFocusChanged (The method is mainly used to process focus change event

2. Which of the following descriptions about methods related to the monitoring interface mechanism is correct () (multiple choice)
A. OnClickListener interface is specially used to handle the click event of the control
B. OnLongClickListener is specially used to handle the long press event
C. OnKeyListener is specially used to monitor the keyboard event
D. OnTouchListener is specially used to handle the touch event of the mobile phone screen

Among the following descriptions about the gesture monitoring interface, the correct one is () (multiple choice)
A. The OnGestureListener interface is used to monitor gestures such as click, slide, and long press.
B. The OnDoubleTapListener interface is used to monitor double-click and single-click gestures.
C. The OnContextClickListener interface is used to monitor mouse/touchpad right-click gestures.
D. The SimpleOnGestureListener class implements the previous All callback methods in the three interfaces

textbook eleven

1. HttpURLConnection is used to send HTTP requests and get HTTP responses. (√)
2. The WebView control in Android is specially used to browse the web, and its usage is the same as other controls. (√)
3. To access the network in Android, you must register the network access permission in AndroidManifest.xml. (√)
4. HtpURLConnection is an abstract class, and objects cannot be instantiated directly. You need to use the openConnection() method of the URL to obtain it. (√)
5. When using HtpURLConnection for HTTP network communication, the request sent by GET method can only send data within 1024 bytes. (√)
6. Android's built-in browser uses the WebView engine. (×)

1. The way Android implements network communication for HTTP mainly includes () (multiple choice)
A. Use HttpURLConnection to achieve
B. Use ServiceConnection to achieve
C. Use HttpClient to achieve
D. Use HttpConnection to achieve

2. The input/output stream operation in HttpURLConnection in Android is uniformly encapsulated into () in HttpClient (multiple choice)
A. HttpGet
B. HttpPost

C. HttpRequest
D. HttpResponse

Textbook XII (None)

Textbook Thirteen

1. The Paint class represents a brush, which is mainly used to describe the color and style of graphics. (√)
2. The Matrix class provided by Android can be combined with other APIs to transform graphics, such as rotation, scaling, and tilting. (√)
3.Bitmap's decodeFile (method is used to parse the Bitmap object from the file. (√)

1. Among the following descriptions about Android animation, the correct one is () (multiple choice)
A. Animation in Android is usually divided into two types: frame-by-frame animation and tween animation.
B. Frame-by-frame animation is to play a set of predefined static images in order to form an animation effect.
C. Tween animation is to continuously modify objects in the scene Perform image changes to generate animation effects
D. When implementing tween animation, you only need to define the key frames for the start and end of the animation, and other transitions are automatically calculated and completed by the system

2.Android provides () tween animation.
A. Transparency gradient animation (AlphaAnimation)
B. Rotation animation (RotateAnimation)
C. Scale animation (ScaleAnimation)
D. Translation animation (TranslateAnimation)

3. The most commonly used classes when Android draws images include ()
A. Bitmap
B. BitmapFactory
C. Paint
D. Canvas

4. Use the () method in the Canvas class in Android to draw ellipses.
A. drawRect()
B. drawOval()
C. drawCircle()
D. drawLine()

5. The following description about the Canvas class is wrong ()
A. Canvas means canvas
B. Canvas can draw various graphics
C. Canvas has the same effect as Paint
D. The drawRectO method of the Canvas class is used to draw a rectangle

textbook fourteen

1. Surface View inherits from View, which is a control that displays images. (√)
2. SurfaceView has double buffering technology. (√)
3. 3. When using MediaPlayer to play video, SurfaceView must be updated in the child thread when displaying video. (×)
4. 4. Android can use SoundPool to play multiple audio files at the same time. (√)
5. 5. When using VideoView to play video, you need to use setVideoPath() to set the playback video path. (√)

1. Which of the following descriptions about multimedia application development is correct () (multiple choice)
A. You can use mediaPlayer or SoundPool to play audio
B. Use MediaPlayer to play only one audio at a time, suitable for playing long music or background music
C. Use SoundPool to play multiple short audio at the same time, suitable for playing button sounds or message prompts

D. SoundPool works with SurfaceView and can also play video

2. The audio types supported by the setAudio StreamType() method in MediaPlayer include () (multiple choice)
A. music
B. ringing bell
C. alarm clock

D. Prompt tone

3. The following description about MediaPlayer is wrong ()
A. MediaPlayer is used to play audio and video
B. MadiaPlayer provides a very comprehensive control method for audio files
C. MadiaPlayer will call the underlying audio driver to play audio
D. MadiaPlayer can only play audio, not video

Textbook Fifteen (None)

Reference

  1. Android Column/CSDN@An_xx_

  2. Chaoxing Learning Pass Intelligent Terminal Software Development (based on Android Studio environment) Chapter Assignment/douding.com

  3. "Android Mobile Application Basic Tutorial" (Android Studio) (Second Edition) Dark Horse Programmers After-school Exercises Answers/CSDN@ToYangToSimple

Guess you like

Origin blog.csdn.net/weixin_52034760/article/details/130237938