Skip to content

Latest commit

 

History

History
55 lines (30 loc) · 1.89 KB

401-26.md

File metadata and controls

55 lines (30 loc) · 1.89 KB
layout title permalink
page
401.26 Reading Notes
/401-R26/

Android Fundamentals

Java Apps

Languages

  • Apps for Android devices are written in various languages:

    • Kotlin

    • C++

    • Java

APKs

  • Android packages (.apk) are files which an app is installed from and include required content that is required for app execution. .apks are archive files (1+ files along with metadata).

AABs

  • 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.

App components

  • 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 individual Intent object.

    • Content Providers: Subclass of ContentProvider-- manages stored data using a URI convention.

Java OS

  • 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

Principle of Least Privilege

  • 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