Coursera-android
Back to current versionRestore this version

coursera-android#

Time spent#

Day hours
2014-01-21 1
2014-01-22 1
2014-01-23 1
2014-01-25 2
2014-01-31 1
2014-02-01 2

TODO#

Weeks#

Week 1#

metskem@athena ~ $ telnet localhost 5554
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Android Console: type 'help' for a list of commands
OK
help
Android console command help:

    help|h|?         print a list of commands
    event            simulate hardware events
    geo              Geo-location commands
    gsm              GSM related commands
    cdma             CDMA related commands
    kill             kill the emulator instance
    network          manage network settings
    power            power related commands
    quit|exit        quit control session
    redir            manage port redirections
    sms              SMS related commands
    avd              control virtual device execution
    window           manage emulator window
    qemu             QEMU-specific commands
    sensor           manage emulator sensors

try 'help <command>' for command-specific help
OK
adb -s emulator-5554 logcat WikiNotes:I *:S

week 2#

Four main building blocks in Android :

Non code (resource) files

Activity

The Activity Lifecycle:

android-activity-lifecycle.png

-- onRestart() , do specific stuff required after activity was stopped
-- onStart() , loading persistent application state
-- onResume() , start foreground-only actions
-- onPause() , shutdown foreground-only actions, save persistent stat
-- onStop() , cache state (may not be called when Android kills the activity)
-- onDestroy() , release activity resources (may not be called when Android kills the activity)

Activities are created by creating Intents, and passing these Intents to startActivity() or startActivityForResult() . Started activity can set the result with Activity.setResult().

AndroidManifest.xml

Contains:

week 3#

Intents

Intent is a data structure that represents:

Intent fields: