Skip to content

Android fundamentals #11

@eldenpark

Description

@eldenpark

procedural programming v. Declarative programming 선언적 프로그래밍

procedural programming 절차적 프로그래밍: 거의 대부분의 절차를 개발자가 정의
선언적 프로그래밍은: 일부만 정의

  • why
  • how's it related to Android?

three core concepts of android app

  • components (5)
  • manifest
  • resources

android components

  • activity
    UI
    AndroidFragments

  • Service
    long running operations
    thread vs service
    track the state of operation
    e.g. music player
    monolithic v. modular architecture

  • Broadcast receiver
    stateless, onReceive()
    delegate call to another component, e.g. Context.startActivity(), Context.startService()
    listening to system events

  • Content providers
    sharing data with other applications as well
    simple key/value pairs => prefer using SharedPreferences
    if having structured data, consider using Database

Last but not least

  • application
    Always only a single instance within an application, use this to keep global variables

manifest

  • top level element
<manifest/>
  • Google Play filters
<uses-feature/>
<supports-screen/>
<uses-sdk/>
<application/>
  • Intent filtering
    abstract description of operation
    explicit Intent: know exactly what activity to startActivity
    implicit Intent: only the action
    pending intent*

Resources

<string/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions