layout | title | permalink |
---|---|---|
page |
401.26 Reading Notes |
/401-R26/ |
-
Apps for Android devices are written in various languages:
-
Kotlin
-
C++
-
Java
-
- Android packages (
.apk
) are files which an app is installed from and include required content that is required for app execution..apk
s are archive files (1+ files along with metadata).
- Android App Bundles (
.aab
) are also archive files, but do not contain content required for execution. AABs are used in distribution of software that may be used by a variety of devices with particular hardware or operation differences, so the eventual APKs may differ from the some AAB.
-
Java apps are comprised of four basic components:
-
Activities: each "screen" with a respective UI. An app may have multiple, and the starting activity does not have to be a single defined one. Activities are subclasses of
Activity
. -
Services: Subclasses of
Service
-- "background" functionality, including while another app's activity is focused. Chains of service dependencies (Bound Services) may exist. -
Broadcast Receivers: Allow for resources to interact with an app outside of activities to provide it with data or trigger a service. Subclass of
BradcastReceiver
as individualIntent
object. -
Content Providers: Subclass of
ContentProvider
-- manages stored data using a URI convention.
-
-
Android OS is Linux
-
Individual apps function as respective users on that system
-
Apps have segregated file permissions
-
Each app runs as a virtual machine paralell to (and isolated from) others
-
As a general (but not unbreakable) rule, each app only has access to the minimum amount of resources required to function
-
The device user must opt into additional hardware/system permissions