Вы находитесь на странице: 1из 3

115 ULTIMATE REVIEWER

Study online at quizlet.com/_5w0kkd

1. Shared Preferences: Store private primitive data in key-value 24. write(byte[) buffer, int byteOffset, int byteCount ): This
pairs. method writes count bytes from the byte array buffer starting
2. Internal Storage: Store private data on the device memory. at position offset to this stream
3. External Storage: Store private data on the device external 25. available(): This method returns an estimated number of bytes
memory. that can be read or skipped without blocking for
more input
4. SQLite Database: Store structured data in a private database.
26. read(byte[) buffer, int byteOffset, int byteCount ): This
5. Network Connection: Store data on the web with your own
method reads at most length bytes from this stream and stores
network server.
them in the byte array b starting at offset
6. getExternalFilesDir(): method to store private files on external
27. getExternalStorageDirectory(): to get to the root of the
storage.
external storage in API < 7
7. Private Files: Files that rightfully belong to your app and
28. getExternalStorageFilesDir(String type): create files specific
should be deleted when the user uninstalls your app. They
to your app that are removed when your app is uninstalled.
don't provide value to the user outside your app.
29. getExternalCacheDir(): store cache files on external storage
8. Public Files: Files that should be freely available to other apps
that are removed when the app is uninstalled and not
and to the end user.
accessible when SD card is removed.
9. getExternalStoragePublicDirectory(): method to store public
30. getExternalStoragePublicDirectory(): store files not specific
files on external storage.
to your app and should not be deleted when your app is
10. MODE_APPEND: This will append the new preferences with the uninstalled.
already existing preferences.
31. Cache Storage: files stored in the files folder are persistent and
11. MODE_ENABLE_WRITE_AHEAD_LOGGING: Database open remain until they are deleted
flag. When it is set , it would enable write ahead logging by
32. getExternalCacheDir(): to get a reference to the absolute path
default.
of your app's cache directory
12. MODE_MULTI_PROCESS: This method will check for
33. SQL: is a language designed for managing data in relational
modification of preferences even if the sharedpreference
databases.
instance has already been loaded.
34. SQLite: is a scaled-down version of MySQL, PostgreSQL and
13. MODE_PRIVATE: By setting this mode, the file can only be
other popular RDBMS.
accessed
using calling application. 35. onCreate(): called when the database is created for the first
time. Creation of tables and initial data inside tables should be
14. MODE_WORLD_READABLE: This mode allow other
put here.
application to read the preferences.
36. onUpgrade(): called when the database needs to be upgraded.
15. MODE_WORLD_WRITEABLE: This mode allow other
Use this method to drop tables, add tables, or do anything
application to write the preferences
else it needs to upgrade to the new schema version.
16. apply(): It is an abstract method. It will commit your changes
37. SQLiteOpenHelper: this class takes care of opening the
back from editor to the sharedPreference object you are
database if it exists, creating it if it does not, and upgrading it
calling.
as necessary
17. clear(): It will remove all values from the editor remove(String
38. JSON: It is similar to XML, but more restricted.
key) It will remove the value whose key has been passed as a
parameter
stands for JavaScript Object Notation.
18. putLong(String key, long value): It will save a long value in a
preference editor derived from JavaScript
19. putInt(String key, int value): It will save a integer value in a
preference editor can be condensed to reduce file size
20. putFloat(String key, float value): It will save a float value in a 39. XML: uses identifying tags similar to HTML
preference editor
21. FileOutputStream(File file, boolean append): This method
constructs a new FileOutputStream that writes to file.
22. getChannel(): This method returns a write-only FileChannel
that shares its position with this stream
23. getFD(): This method returns the underlying file descriptor
40. It is used while writing JavaScript based applications that 46. String FILENAME = "mytext.txt";
includes browser extensions and websites. String string = "hello world";
FileOutputStream fos =
JSON format is used for serializing and transmitting openFileOutput(FILENAME,Context.MODE_PRIVATE);
structured data over network connection. byte[] buf = string.getBytes();
fos.write(buf);
It is primarily used to transmit data between a server and fos.close;: Writing Files
web applications. 47. FileInputStream fin = openFileInput(file);
String temp = "";
Web services and APIs use JSON format to provide public while( (c=fin.read()) != -1) {
data. temp = temp + Character.toString((char)c);
}
It can be used with modern programming languages.: //string temp c: Reading Files
Purpose of JSON
48. android:padding property: increase the whitespace between
41. Number - double- precision floating-point format in widgets
JavaScript (Integer, Fraction, Exponent )
49. ContextThemeWrapper: is the direct parent of Activity class.
50. TextView: It is an Android user interface used to display text to
String - double-quoted Unicode with backslash escaping
the user.
Boolean - true or false 51. 1. Implicit Intent - doesn't specifiy the component

Array - an ordered sequence of values Example:Intent intent=new Intent(Intent.ACTION_VIEW);


intent.setData(Uri.parse("http://www.javatpoint.com"));
Value - it can be a string, a number, true or false, null etc startActivity(intent );

Object - an unordered collection of key:value pairs 2. Explicit Intent - specifies the component

Whitespace - can be used between any pair of tokens Example:Intent i = new


Intent(getApplicationContext(),ActivityTwo.class);
null - empty: JSON Data Types startActivity(i);: two types of Intent in Android. Give an
example for each type
42. JSON is easy to read and write.
52. 1. Activity - a single screen which may contain logical
It is a lightweight text-based interchange format. processes

JSON is language independent.: Characteristics of JSON 2. Service - runs a process at the background w/o an
interface
43. Firebase: is a fully managed platform for building iOS,
Android, and web apps that provides automatic data
3. Broadcast Receiver - receives and reacts to broadcast
synchronization, authentication services, messaging, file
intents
storage, analytics, and more.
44. Build better apps
4. Content Provider - makes application data available to
other applications: Enumerate and discuss the components of
Improve app quality
an Android application

Grow your business 53. mipmap/: In changing the icon of your Android application, the
image that you will use should be placed in
Realtime Database: Features of Firebase which folder?

45. <uses-permission 54. onPause() --> onStop() --> onDestroy(): From an active or
android:name="android.permission.INTERNET"/>: Needed running Activity to the Activity shutdown, what is the correct
Permission sequence of the
given Activity Lifecycle?
55. 21: Material Design was introduced in API Level ______.
56. • Crashing if the user receives a phone call or switches to 71. • Toast messages can be customised and printed anywhere
another app while using your app. on the screen, but a Snackbar can be
only showed in the bottom of the screen.
• Consuming valuable system resources when the user is
not actively using it. • A Toast message don't have action button, but Snackbar
may have action button optionally.
• Losing the user's progress if they leave your app and Though, A Snackbar shouldn't have more than one action
return to it later. button.

• Crashing or losing the user's progress when the screen • Toast message cannot be off until the time limit finish, but
rotates between landscape and Snackbar can be swiped off before
portrait orientation.: State at least four (4) reasons why the time limit.: Differentiate a Toast with a Snackbar
callback methods need to be implemented properly. 72. Scale Independent Pixel: What does sp stand for?
57. Toast.makeText(context, string, duration).show();: Which of the 73. onClick: The ______ property of a Button is assigned with the
following is the correct syntax for displaying a Toast method name which is invoked once it is
message? clicked.
58. • extend IntentService 74. onCreate > onStart > onResume > onPause > onStop >
• include a no-argument constructor which calls the super() onRestart
constructor; pass the service name
as a string to the call to super() onCreate > onStart > onResume > onPause > onStop >
• implement onHandleIntent() method: Enumerate the onDestroy: Which of the following is a valid sequence of
requirements of converting a class into an IntentService. invokes to Activity lifecycle methods? Choose two.
59. <service android:name=.ExamService />: Write the required
entry in the AndroidManifest.xml file to register a service
whose filename is ExamService.java.
60. For Debug logs: Why is Log.d() used?
61. False: An Activity is a messaging object you can use to request
an action from another app component.
62. ImageView: These are Android components used to display
images (or bitmaps) or any drawable components.
63. Log: It is an API component used to send Log output.
64. Use XML file and specify color value
Use layout file and specify color value: How can we use
custom colors in application? Choose two.
65. AndroidManifest.xml: By default in android studio during app
development, file that holds information about app's
fundamental features and components is
66. onStop() callback method: is called when the activity is no
longer visible.
67. onDestroy(): In shutting down or terminating an application,
which is the last lifecycle method is called?
68. src/: Which of the following holds Java source code for the
application?
69. onResume() callback method: is called when the the user
starts interacting with the application.
70. onPause() --> onResume(): If a running activity was interrupted
by another activity like a call, or an alarm that went of, or a
notification that your downloaded application is already
finished, what are the lifecycle methods
that will be called to resume the previously running activity
back to its active runtime?

Вам также может понравиться