Podcast
Questions and Answers
Which of the following is NOT a type of persistent storage available in Android applications?
Which of the following is NOT a type of persistent storage available in Android applications?
Shared Preferences in Android can store non-primitive data types.
Shared Preferences in Android can store non-primitive data types.
False
What is the purpose of the AssetManager in Android applications?
What is the purpose of the AssetManager in Android applications?
To provide access to an application's raw asset files.
The __________ directory in Android is used for storing compiled XML files.
The __________ directory in Android is used for storing compiled XML files.
Signup and view all the answers
Match the following persistent storage types with their descriptions:
Match the following persistent storage types with their descriptions:
Signup and view all the answers
Which method is used to bind an adapter to a ListView?
Which method is used to bind an adapter to a ListView?
Signup and view all the answers
The BaseAdapter class does not require the implementation of the getCount() method.
The BaseAdapter class does not require the implementation of the getCount() method.
Signup and view all the answers
What is the purpose of the ViewHolder pattern in an adapter?
What is the purpose of the ViewHolder pattern in an adapter?
Signup and view all the answers
To display a list in Android, the class used is called __________.
To display a list in Android, the class used is called __________.
Signup and view all the answers
What data structure is used to store key-value pairs in a SimpleAdapter?
What data structure is used to store key-value pairs in a SimpleAdapter?
Signup and view all the answers
Match the following classes or interfaces with their correct purpose:
Match the following classes or interfaces with their correct purpose:
Signup and view all the answers
Parcelable is more complex than Serializable in Java.
Parcelable is more complex than Serializable in Java.
Signup and view all the answers
What method would you use to retrieve the selected item in a Spinner?
What method would you use to retrieve the selected item in a Spinner?
Signup and view all the answers
To show a toast message in Android, you use __________.makeText().
To show a toast message in Android, you use __________.makeText().
Signup and view all the answers
What attribute is used to align a component to the top of its parent in a RelativeLayout?
What attribute is used to align a component to the top of its parent in a RelativeLayout?
Signup and view all the answers
The android:layout_rowSpan attribute is used to spread a component across multiple columns in a GridLayout.
The android:layout_rowSpan attribute is used to spread a component across multiple columns in a GridLayout.
Signup and view all the answers
How do you specify that a view in a GridLayout should start at the first column?
How do you specify that a view in a GridLayout should start at the first column?
Signup and view all the answers
In a RelativeLayout, to align one view relative to another, you would use _______ attributes.
In a RelativeLayout, to align one view relative to another, you would use _______ attributes.
Signup and view all the answers
Match the following layout features with their descriptions:
Match the following layout features with their descriptions:
Signup and view all the answers
Which of these attributes would you use to center a component in its parent layout?
Which of these attributes would you use to center a component in its parent layout?
Signup and view all the answers
What is the primary purpose of using Include, Merge, and ViewStub in layouts?
What is the primary purpose of using Include, Merge, and ViewStub in layouts?
Signup and view all the answers
Which method is executed first in the AsyncTask lifecycle?
Which method is executed first in the AsyncTask lifecycle?
Signup and view all the answers
The doInBackground() method runs synchronously and blocks the UI thread until completion.
The doInBackground() method runs synchronously and blocks the UI thread until completion.
Signup and view all the answers
What type of values does the AsyncTask class accept for its execute() method?
What type of values does the AsyncTask class accept for its execute() method?
Signup and view all the answers
The method that provides a way to update the UI with progress from doInBackground is called __________.
The method that provides a way to update the UI with progress from doInBackground is called __________.
Signup and view all the answers
Match the following AsyncTask methods with their descriptions:
Match the following AsyncTask methods with their descriptions:
Signup and view all the answers
What does the publishProgress() method do in the AsyncTask class?
What does the publishProgress() method do in the AsyncTask class?
Signup and view all the answers
The onPostExecute() method accepts parameters of a primitive type.
The onPostExecute() method accepts parameters of a primitive type.
Signup and view all the answers
What is the return type of the doInBackground() method in this context?
What is the return type of the doInBackground() method in this context?
Signup and view all the answers
The AsyncTask class runs work on a __________ thread, separate from the UI thread.
The AsyncTask class runs work on a __________ thread, separate from the UI thread.
Signup and view all the answers
In the HeavyTask class, which method is called to perform background processing?
In the HeavyTask class, which method is called to perform background processing?
Signup and view all the answers
What method is used to obtain a string from a JSONObject?
What method is used to obtain a string from a JSONObject?
Signup and view all the answers
JSONArray does not allow accessing its elements by index.
JSONArray does not allow accessing its elements by index.
Signup and view all the answers
What is the purpose of POJO in Java?
What is the purpose of POJO in Java?
Signup and view all the answers
Retrofit uses _____ by default for JSON conversion.
Retrofit uses _____ by default for JSON conversion.
Signup and view all the answers
Match the following methods with their functions:
Match the following methods with their functions:
Signup and view all the answers
Which HTTP method is used to request data in Retrofit?
Which HTTP method is used to request data in Retrofit?
Signup and view all the answers
RestAdapter must be built before creating a RestInterface instance.
RestAdapter must be built before creating a RestInterface instance.
Signup and view all the answers
What is the primary role of the Retrofit Interface?
What is the primary role of the Retrofit Interface?
Signup and view all the answers
The library that provides a set of tools for managing the URL's is called _____ class.
The library that provides a set of tools for managing the URL's is called _____ class.
Signup and view all the answers
Which of the following is not mentioned as a resource for Android development?
Which of the following is not mentioned as a resource for Android development?
Signup and view all the answers
Study Notes
Mobile Devices and Applications
- This unit covers Android basics, including objectives, evaluation criteria, and a learning path.
Unit 1 - Android Basics
-
Objectives:
- Efficiently use mobile technologies within the information society.
- Understand mobile device principles.
- Achieve Android development skills.
-
Evaluation:
- Course activity: 50% (final quiz exam - 50%, lab activity - 50%, 2 partial evaluations - 30%, ongoing evaluation - 20%)
- Final evaluation: January ???, 2023
- Minimum laboratory attendance: 70%
- Minimum 2.5/5 points for attending the final exam
- Pass all evaluation activities with a minimum of 50% from the total points.
-
Agenda:
- Mobile devices
- Android framework
- Development instruments
- Android application structure
-
Learning path:
- Mobile devices (architecture, characteristics, limitations)
- Mobile OS (functions, user interfaces, applications)
- Mobile apps (life cycle, resources, components)
- Android development skills.
Mobile devices
-
Characteristics and Functionality:
- Social networking (managing personal content like contacts, agenda, calendar)
- Internet browsing
- Entertainment & multimedia (games, virtual books, movies, images, music)
- Communication (e-mails, messages, voice services)
- Navigation (GPS, localization)
- Financial transactions
- Portability
- Usability
- Performance (autonomy - battery life)
- Memory (RAM and ROM)
- Bandwidth
- User Experience
- Form factor
-
Limitations:
- Dimensions (screen, keyboard)
- Autonomy (battery life)
- Performance
- Memory (RAM and ROM)
- Bandwidth
- User Experience
- Form factor
- Trends (prices, hardware/software performance, usability)
-
Hardware characteristics:
- Processor
- Memory
- Screen
- Data gathering
- Connectivity
- System on a Chip (SoC) components (Flash memory, RAM, Power supply, Communication Processor, CPU, GPU, Audio, I/O devices, SIM, Screen)
-
SoC characteristics/components:
- Application processor (CPU)
- Memory interface
- Graphic processor (GPU)
- USB controller
- Serial interface
- Bluetooth controller
- Wi-Fi controller
- Camera interface
- Architecture (RISC)
- Processors (ARM, Intel)
- Working frequencies (around 2.7 GHz)
- Core count (one, dual, quad, octa-core)
- Low power consumption
-
SoC examples:
- Marvell: PXA
- Texas Instruments: OMAP
- Samsung: S3C, S5C, S5P
- Qualcomm: MSM, QSD
- nVidia: Tegra
- Snapdragon 400 - 800 - 765G with Kryo 475(current Google Pixel 5 specs) (2.45 GHz)
- Exynos 5, 7, 2200
- Tegra 4, K1
-
Specific components (Memory): RAM (up to 6GB)
- Internal non-volatile memory (Flash, NOR, NAND)
- External memory (SD cards)
- NAND Flash Specs (comparing SLC, EMLC, MLC, TLC based on bits per cell, power, speed, and endurance)
-
Screen Characteristics:
- Diagonal (~87.6 cm²)
- Resolution (1080 x 2340 pixels)
- Pixel density (~432 ppi)
- Number of colors (16M colors)
- Technology (LCD TFT, LCD IPS, OLED, AMOLED)
- Touchscreen type (resistive, capacitive)
- Data input solutions such as virtual / numeric keyboards, Joysticks, QWERTY keyboards, swiping, vocal commands, fingerprint, face recognition
- Connectivity such as voice services, data connection, area coverage, Small – NFC/Bluetooth, Extended – Wi-Fi a/ b/g/n/ac
- Bandwidth and technologies for wireless networks such as WPAN (9.6 Kbps–3 Mbps), WLAN( 1–300 Mbps), WWAN (8 Kbps-300 Mbps) and related technologies (IR, Bluetooth, NFC, GSM, EDGE, UMTS, etc.)
-
Mobile Operating Systems:
- Architecture and main functions
- Manage hardware and software resources
- Manage memory
- Control processes
- Check I/O gates
- Run applications
- File management
- Check the user interface
- E-mail/Web messages
- PIM
- Other applications
- User interface
- Basic functions/Services
- Kernel
- Drivers
- Hardware -Telephony
- Android(Google), Bada(Samsung), Tizen(Tizen Association), Blackberry OS(Blackberry/RIM),BREW(Qualcomm),Firefox OS(Mozilla),iOS(Apple),Linux Mobile, Palm OS/Garnet OS(Palm),Symbian(Nokia),webOS(HP),Windows Phone/Windows CE/Windows Mobile(Microsoft)
-
Market share (Italy - August 2020):
- Android: ~75%
- iOS: ~25%
- Other operating systems less than 1%
-
Android:
- Bought by Google in 2005
- Open Handset Alliance in 2007
- Powered by Linux 2.6.x/3.x kernel
- Java/Kotlin based applications
- Phones(HTc, Samsung, Google Nexus)
- Tablets(Samsung Galaxy Tab, Google Nexus 7)
- Free/open source software ecosystem (Sailfish OS, Tizen, Ubuntu Touch OS, OpenMoko Linux, etc.)
- Android System Stack(Applications, Android Framework, Native Libraries, HAL, and Linux Kernel)
- Android architecture components(Applications, Application Framework, Libraries, Hardware, Abstraction Layer, Linux Kernel)
- Media server
- System server
- HAL
- Android runtime
- Dalvik Virtual Machine - bytecode optimized file system
-
APK Signature Structure (describing the APK format steps)
-
Android Binary Files (describing the different types of files inside an APK structure such as .java, .class, .dex)
-
Components (describing the structure of an app in sections such as sources ,res, build properties and gen.)
-
UI components: List of UI controls, such as Textview, Edittext, Button, Radiobutton , Checkbox,ImageView, ProgressBar,SeekBar, AnalogClock, etc.
-
Event handling - using listeners, xml, and java code. Steps involved in registering listeners like (View.OnclickListener) , (View.OnTouchListener), (View.OnLongClickListener) in an interface, xml file.
-
XML layout component - creating layout files with properties for elements using XML.
-
Common properties including properties for dimensions, appearance, spacing, active state , focus, container parameters, position.
-
Layout containers such as LinearLayout, Relative layout, FrameLayout, and GridLayout
-
Different file types (XML) - specifying the path for layout files, and res/values folder.
-
Screen sizes, densities: Methods and code examples for conversions 1px = 1.5dp
-
Android UI Controls and their use: Common Android UI components (TextView, EditText, Button, ImageView, ProgressBar, etc.) and how to integrate them into an interface
-
Android Support Library - a set of components and classes for managing the application in a structured way
-
Android Virtual Device (AVD): An emulator that simulates Android devices. Emulators are used for creating testing environments. Includes functionality to simulate different processors, screen sizes, cameras, memory and API version, as well as the communication with the device via the ADB.
-
Android Profiler: For monitoring and analyzing app performance, memory, network interactions, and other essential data sources
-
Message console (Logcat): Shows the logs sent by applications while running including warnings, debug information, errors, or info messages in verbose mode
-
Device File Explorer: Tools to manage and explore files on the connected device
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Related Documents
Description
Test your knowledge on Android persistent storage, adapters, and UI components in this informative quiz. Covering topics such as Shared Preferences, AssetManager, and the ViewHolder pattern, you'll reinforce your understanding of essential Android concepts. Perfect for both beginners and experienced developers!