Skip to the content ForoHackers
Log inJoin

Android: start here

Android
#655 · Ophuscado · · Report

Android is an open-source operating system for phones, tablets, watches, televisions and cars, built on the Linux kernel. Apps run in a managed runtime inside a sandbox, each as its own user, and the system may stop them at any moment to save memory or battery. Writing for it means working with that lifecycle.

Key concepts

  • App components: activities show screens, services work in the background, broadcast receivers and content providers share events and data.
  • Lifecycle: the system creates, pauses and destroys components; save state and never assume you keep running.
  • Permissions and sandbox: each app has its own identity, and sensitive features need the user's consent at run time.
  • Background limits: scheduled work goes through system schedulers that respect battery and network.
  • Resources and form factors: layouts, strings and images are selected by language, screen size and density.

Vocabulary

  • Intent: a message that asks the system or another app to do something.
  • APK and app bundle: the packaged forms of an app.
  • Manifest: the file that declares an app's components and permissions.
  • ADB: Android Debug Bridge, a command-line tool to talk to a device.

What to study, in order

  1. Learn Kotlin, or Java, well enough to read the platform's code.
  2. Build a one-screen app, run it on an emulator and on a real phone, and read its log output.
  3. Study the lifecycle by rotating the screen and killing the app, watching what is lost.
  4. Add a list from a network source, with storage on the device and work that survives a restart.
  5. Request one permission properly, including what happens when the user says no.

Related tags

#kotlin #java #mobile-security #linux

Log in or join to reply.