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
- Internal Files
- SQLite databases
- Cookies (correct)
Shared Preferences in Android can store non-primitive data types.
Shared Preferences in Android can store non-primitive data types.
False (B)
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.
Match the following persistent storage types with their descriptions:
Match the following persistent storage types with their descriptions:
Which method is used to bind an adapter to a ListView?
Which method is used to bind an adapter to a ListView?
The BaseAdapter class does not require the implementation of the getCount() method.
The BaseAdapter class does not require the implementation of the getCount() method.
What is the purpose of the ViewHolder pattern in an adapter?
What is the purpose of the ViewHolder pattern in an adapter?
To display a list in Android, the class used is called __________.
To display a list in Android, the class used is called __________.
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?
Match the following classes or interfaces with their correct purpose:
Match the following classes or interfaces with their correct purpose:
Parcelable is more complex than Serializable in Java.
Parcelable is more complex than Serializable in Java.
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?
To show a toast message in Android, you use __________.makeText().
To show a toast message in Android, you use __________.makeText().
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?
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.
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?
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.
Match the following layout features with their descriptions:
Match the following layout features with their descriptions:
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?
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?
Which method is executed first in the AsyncTask lifecycle?
Which method is executed first in the AsyncTask lifecycle?
The doInBackground() method runs synchronously and blocks the UI thread until completion.
The doInBackground() method runs synchronously and blocks the UI thread until completion.
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?
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 __________.
Match the following AsyncTask methods with their descriptions:
Match the following AsyncTask methods with their descriptions:
What does the publishProgress() method do in the AsyncTask class?
What does the publishProgress() method do in the AsyncTask class?
The onPostExecute() method accepts parameters of a primitive type.
The onPostExecute() method accepts parameters of a primitive type.
What is the return type of the doInBackground() method in this context?
What is the return type of the doInBackground() method in this context?
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.
In the HeavyTask class, which method is called to perform background processing?
In the HeavyTask class, which method is called to perform background processing?
What method is used to obtain a string from a JSONObject?
What method is used to obtain a string from a JSONObject?
JSONArray does not allow accessing its elements by index.
JSONArray does not allow accessing its elements by index.
What is the purpose of POJO in Java?
What is the purpose of POJO in Java?
Retrofit uses _____ by default for JSON conversion.
Retrofit uses _____ by default for JSON conversion.
Match the following methods with their functions:
Match the following methods with their functions:
Which HTTP method is used to request data in Retrofit?
Which HTTP method is used to request data in Retrofit?
RestAdapter must be built before creating a RestInterface instance.
RestAdapter must be built before creating a RestInterface instance.
What is the primary role of the Retrofit Interface?
What is the primary role of the Retrofit Interface?
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.
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?
Flashcards
RelativeLayout
RelativeLayout
A layout where views are positioned relative to each other and the parent container, using attributes like android:layout_alignParentTop
and android:layout_alignLeft
.
Align to Parent Top
Align to Parent Top
The attribute android:layout_alignParentTop
aligns a view to the top edge of its parent container within a RelativeLayout.
Align to Other Components
Align to Other Components
You can position views relative to other views within a RelativeLayout, such as android:layout_alignLeft="@id/viewName"
to align the left edge to the left edge of another view.
Position Below/Above
Position Below/Above
Signup and view all the flashcards
Position to Right/Left Of
Position to Right/Left Of
Signup and view all the flashcards
GridLayout
GridLayout
Signup and view all the flashcards
GridLayout Row Span
GridLayout Row Span
Signup and view all the flashcards
ListView
ListView
Signup and view all the flashcards
ArrayList
ArrayList
Signup and view all the flashcards
ArrayAdapter
ArrayAdapter
Signup and view all the flashcards
SimpleAdapter
SimpleAdapter
Signup and view all the flashcards
BaseAdapter
BaseAdapter
Signup and view all the flashcards
OnItemClickListener
OnItemClickListener
Signup and view all the flashcards
onItemClick
onItemClick
Signup and view all the flashcards
Object Serialization
Object Serialization
Signup and view all the flashcards
Serializable
Serializable
Signup and view all the flashcards
What is AsyncTask?
What is AsyncTask?
Signup and view all the flashcards
What does the onPreExecute() method do?
What does the onPreExecute() method do?
Signup and view all the flashcards
What is the purpose of the doInBackground() method?
What is the purpose of the doInBackground() method?
Signup and view all the flashcards
What is the purpose of the onProgressUpdate() method?
What is the purpose of the onProgressUpdate() method?
Signup and view all the flashcards
What is the role of the onPostExecute() method?
What is the role of the onPostExecute() method?
Signup and view all the flashcards
What is the purpose of the publishProgress() method?
What is the purpose of the publishProgress() method?
Signup and view all the flashcards
How do you start an AsyncTask?
How do you start an AsyncTask?
Signup and view all the flashcards
What data types can be passed to an AsyncTask?
What data types can be passed to an AsyncTask?
Signup and view all the flashcards
What is a common use of the onPreExecute() method?
What is a common use of the onPreExecute() method?
Signup and view all the flashcards
What kind of work should be done in the doInBackground() method?
What kind of work should be done in the doInBackground() method?
Signup and view all the flashcards
Application container: res/raw
Application container: res/raw
Signup and view all the flashcards
Application container: Assets directory
Application container: Assets directory
Signup and view all the flashcards
Application container: AssetManager
Application container: AssetManager
Signup and view all the flashcards
Application container: App's private storage area
Application container: App's private storage area
Signup and view all the flashcards
Application container: App's private external storage area
Application container: App's private external storage area
Signup and view all the flashcards
JSON
JSON
Signup and view all the flashcards
JSONObject
JSONObject
Signup and view all the flashcards
JSONArray
JSONArray
Signup and view all the flashcards
POJO
POJO
Signup and view all the flashcards
Retrofit
Retrofit
Signup and view all the flashcards
RestAdapter
RestAdapter
Signup and view all the flashcards
Retrofit Interface
Retrofit Interface
Signup and view all the flashcards
Gson
Gson
Signup and view all the flashcards
JSON Schema to POJO Converter
JSON Schema to POJO Converter
Signup and view all the flashcards
Retrofit Method
Retrofit Method
Signup and view all the flashcards
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.