Android Flashcards

1
Q

What is API level?

A

API level marks Android API version – version of libraries
and classes which are available to
programmers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Can different versions of Android have the same API level?

A

Yes they can. This means that 2.3.3 to 2.3.7 didn’t have API changes visible to
developers, but just enhancements and bugfixes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Android?

A

Android is SW platform designed for mobile devices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does Android consists of?

A

More than OS, it is a software stack, consisted of:
1) Os
2) Basic libraries and runtime environment
3) Application framework
4) Applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

For what purpose is software platform designed?

A

1) Take into the account limitations of mobile platforms, such as low
processing power, memory, battery…
2) Support large spectrum of mobile devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why do programmers care about API level?!

A

1) Higher API level – more functionalities
2) Programmer must choose and declare API level in
application during programming
3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why do programmers care about API level?!

A

1) Higher API level – more functionalities
2) Programmer must choose and declare API level in
application during programming
3) API level determines which devices will be compatible
with the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the first, and what is the last API level?

A

First API level was 1, and last is 27(Oreo) - with newest Pie emerging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the three API levels that progrmmer can define inside Android Manifest (XML file)?

A

Those are:
1)minSdkVersion
2)targetSdkVersion
3)maxSdkVersion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is minSdkVersion?

A

It is the minimum version on which app can execute. Android will not allow
installation on device with smaller API version than minSdkVersion. It is
recommended to define this value, otherwise Android will assume API version 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is targetSdkVersion?

A

It is API version on which application was built and tested, if not
defined, Android assumes that it is equal to minSdkVersion

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is maxSdkVersion?

A

Not necessary, even not recommended to be defined, as it limits
max API version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What to do if we want functionality from the newer API level on device
with older Android version?

A

Android support libraries – external
libraries which are added to the project and provide required API level
and behaviour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Of what consists Android platform?

A

It is software stack that consists of:
1) Java API
2) C/C++ libraries
3) Android Runtime
4) HAL - Hardware Abstraction Level
5) Linux Kernel

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are System apps?

A

They are set of basic applications:
1) Email
2) SMS messages
3) Calendar
4) Browser
5) Maps
6) Contacts
*Preinstalled applications don’t have any special status compared to the applications user installs
*These applications are written in Java programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is Java API?

A

It is a set of Android OS functionalities:
1) View System
2) Resource Manager
3) Notification Manager
4) Activity Manager
5) Content Provider

*Developers who are developing Android apps have access to the same set of functions used by system apps.

17
Q

What is the role of View System?

A

App development, including lists, alignments, text
fields, buttons…

18
Q

What is the role of Resource Manager?

A

Provides access to the resources outside code
(localized strings, images, xml layouts)

19
Q

What is the role of Notification manager?

A

Allows applications to show notifications in status
line

20
Q

What is the role of Activity Manager?

A

Manages application lifecycle and provides
common navigation stack.

21
Q

What is the role of Content Provider?

A

Allows applications to access data from other
applications, or data sharing

22
Q

What are C/C++ libraries?

A

Libraries that are used by Android system components.
* Numerous system components and services are developed in C/C++
* It is possible to develop apps using C/C++, but then you must use
Android NDK

23
Q

What is API?

A

Data structures, utilities, file access, network access

24
Q

What is Android runtime (ART)?

A

Starting with Android 5.0,
API 21, runtime environment used by apps and
services in Android
* Every application executes inside its own process in
separate VM under ART
* ART environment executes Dex bytecode, which is
optimized for small memory print

25
Q

What are the characteristics of ART?

A
  • AOT (Ahead-of-time) and JIT (Just-in-time)
  • Optimized GC
  • Support for debugging, diagnostics, monitoring…
26
Q

What is used before version 5.0 (API 21) as environment?

A

Before version 5.0 (API 21), Dalvik was used as
environment.
* ART are Dalvik compatible
environments for real time operation, which
execute Dex bytecode.
* That means that apps
developed for Dalvik should work under ART as well

27
Q

What is HAL?

A

Hardware Abstraction Layer
* Provides common interface which exposes hardware characteristics through Java API
* This layer has large number of libraries, every one of them implements interface to some standard HW component, such as camera, BT,
sensors…
* When you make a call through API and through HW interface, Android loads lib for a given component

28
Q

For what is responsible Linux Kernel?

A

Linux kernel is responsible for key system processes:
* Memory management
* Process management
* Power and energy management
* HW management

29
Q

What are the steps in Android App development?

A

1) Setup: -Set up your development environment
-Set up AVDs (Android Virtual Devices)

2) Development: -Create your application

3) Debugging and Testing: -Build and run your app
-Debug your app
-Test your app

4) Publishing: -Prepare your app for release
-Release your app

30
Q

In which programming language are Android apps developed?

A

Development in Java programming language
* Some standard Java libs are not supported (i.e. Swing and
AWT)
* This is due to dispute between Oracle and Google

Java code is translated to Dalvik bytecode (.dex),
instead to Java byte code (.class)
* Optimization for mobile devices – better memory
management, better battery usage…

Instead of Java VM, Android uses ART VM which
executes .dex files

31
Q

What is ADB?

A

ADB is a client server program, which connects
client (dev machine) with device/emulator, to make
development easier

32
Q

How android apps work?

A

All apps are “closed” (boxed)

Every app executes inside it’s own Linux process
* Process starts when app code should be executed
* Threads are used for time consuming operations

Every process has it’s own VM

Every app has unique Linux ID
* Privileges are set in such way that files from one
application are visible only to that application

33
Q

What is emulator?

A

It is a set of virtual mobile devices

*It is possible to develop app on the computer without using real phone

34
Q

What are the advantages of Mobile apps?

A
  • Always next to the user
  • Internet access
  • Usually have GPS
  • Usually have accelerometer and compass
  • Most of them have camera / microphone
  • Majority of apps is free or very cheap
35
Q

What are the flaws of Mobile apps?

A
  • Limited screen
  • Limited battery
  • Limited processing power
  • Limited/slow access to network resources
  • Limited or not adequate input – SW keyboard,
    touch screen
  • Limited browser…
36
Q

How to put app on the market?

A

It is required to open account on Google Developer
* Membership 25 USD
* Limitation of 100MB per APK file

Connect to appropriate account for e-commerce
* Google Checkout
* Google has share of 30%

37
Q

What is the philosophy of apps?

A

Apps should be:
* Fast – limited resources, less than 512 MB RAM, slow
CPU
* Responsive – must react to user action in less than 5
seconds
* Safe – declaration of required permissions in manifest
* Usability and data management – Android can suspend and kill process in the background if necessary, without asking the user