Mobile Flashcards
Why a smartphone is a game changer?
Because it changed completely how we handle our daily lifes. It’s a general-purpose computing device that can always be with the user, like having the features of a PC in a pocket. It has sensors and actuators to help observe and impact on the environment.
What are the differences between feature phones and smartphones? Both in programming and in usage
Feature phones:
- limited set of functions
- innovation trying to reduce size and costs
- devs cannot build extensions, they would have to modify the firmware with low-level programming
Smartphones:
- follow the user
- ships with an OS that developers can build apps for
- app development is high-level programming similarly to developing for PC.
What are the main smartphone and wearable OSes?
Mobile:
- iOS (Apple) - main language is Swift
- Android (Google etc.) - main language is Java/Kotlin
Wearable:
- wearOS (Google)
- watchOS (Apple)
- TizenOS (Linux based, samsung)
Why Android? Why Java?
Android provides several advantages to developers:
- Based on well known linux kernel
- Code is mostly open-source (each manufacturer can customize it based on its hardware and needs)
- Programmable with Java (2nd most used language)
Java is one of the most well-known languages, runs on a VM
What is the Open Handset Alliance?
In 2005 Google bought Android Inc. from Andy Rubin, and created the Open Handset Alliance (OHA) which is a non-profit alliance that comprehends signatures from 84 firms between manufacturers, operators and companies. The OHA mission is to accelerate innovation in mobile and offer to consumers a richer, less expensive and better experience.
What is the API level and how is it specified?
The API level is an integer number that denotes the version of the API being used by a particular app.
Each Android version supports one API level, but implicitly supports all previous levels.
It can be specified in the build.gradle file, having a property for the mininum sdk version and one for the target sdk version
Describe the Android Architecture in all its layers
- System Applications
- Java API
- Native C/C++ libraries - ART
- Hardware Abstraction Layer
- Linux Kernel
Android - The Principle of Least Privilege
Each app has
- It’s own ART instance and sandbox
- It’s own linux user and UID
- By default, no permission. They must be granted either at install time or at install and runtime (dangerous permissions)
What is Dalvik? How is Dalvik code compiled?
Prior to Android 5, Dalvik was the JVM version developed specifically for android. It allowed apps to run consuming less resources than the standard JVM and with many optimizations specifically studied for mobile devices.
.java -> javac -> .class -> Delvik compiler -> .dex -> Delvik optimizer -> .odex
What is ART? How is ART code compiled?
After Android 5, Dalvik VM was substituted with ART.
ART is not a Java VM. In fact, it allows to run code compiled to native code, requiring longer install but giving more performances.
.java -> javac -> .class -> Delvik compiler -> .dex -> DEX2OAT -> .oat
What are the main building blocks for android apps?
Activities, Services, Broadcast Receivers, Content Providers
What are the states of an Activity?
Starting, Running, Paused, Stopped, Destroyed
What are Intents? How many types exists in Android?
Intents are a medium for the developer to request the start of an activity to the system.
Intents can be sent to broadcast receivers (Broadcast intent), or they can be used to start an Activity. They are also used to pass parameters between activities.
Intents can be either implicit or explicit.
What is material design?
Material Design has been created by google to help build consistent user interfaces and experiences in applications and consists of a set of guidelines, components and tools that support the best practices of UI design.
What are the Material Studies?
Matierial Studies is a set of real-world use case scenario of material design.
Each Material Study illustrates how different brands can express their style and experience in different product and service categories.
What is Context Awareness?
Context Awareness is a paradigm of mobile programming where the device can recognize environmental situations (e.g. if the user is running/walking/standing, the vehicle being used or type of excercise). Accelerometers are used a lot to build Context Awareness.