cs193a android programming

Upload: rosy01710

Post on 14-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 CS193a Android Programming

    1/4

    CS193a Android Programming

    CS193a teaches basic Android programming for an audience with moderate programming experience.

    Lectures and Homeworks

    1. Introduction2. Intent, onClick, Animation

    3. Lifecycle, state save

    4. Lists, Preferences

    5. SQLite, Lists, Menus -- db/list homework

    6. How GUIs work, custom views

    7. Monkey View, Touch Gestures, Game Animation --

    view homework

    8. Advanced View Techniques, Background Tasks

    9. Pixels, Running, Notifications -- last homework

    10. Market, .apk, Certs

    Try our Baby Picture Fun app in the market: Baby

    Picture Fun

    (see CourseWare site for hw turn-in instructions

    (you may need to sign in to see the instructions))

    Recent news articles related to Android and thephone/tablet space (newest first)

    Kindle Fire Released -- an android device from

    amazon. Not exactly like a regular device. Does not

    support the regular store. However, it's cheap

    ($200) as amazon figures to make the money back

    some other way. Cheap hardware in people's hands

    is neat. You need to tie it to a 1-click-shopping-

    enabled amazon account for the machine to work at

    CourseWare site -- please add yourself to cs193a here. We'll use CourseWare

    for questions and discussions. Since we're just grading the homework's 0/1, it's

    fine for to post any sort of question or answer. The staff will be keeping a close

    eye on the forums to answer questions.

    Office Hours

    -Nick Parlante (nick.parlante @ cs.stanford.edu)

    - Thu 2:00-4:30 or by appt, Gates 189

    -Madiha Mubin (mamubin @ stanford.edu)

    - Tue (Gates B26b) and Wed 12:00-2:30 (Gates b02 basement)

    Android Doc Links

    developer.android.com -- main developer siteInstalling the SDK

    Managing AVDs

    Application Fundamentals

    Activities

    Activity Lifecycle

    Logging

    Views and Layouts

    Animation with Views

    Toast NotificationsDev Tools App how to install in a real phone

    List View

    View superclass

    Handler class for posting runnables for the UI thread

    Background Services

    Status Notifications

    Publishing and Market

  • 7/27/2019 CS193a Android Programming

    2/4

    all, so that's a bit creepy. I suspect this is sign of

    cheap/prolific android hardware of all sorts in the

    future.

    Flash Canceled for Mobile -- shows how open

    platforms such as HTML5 and to a degree Android

    seem to be taking over. Think how annoying it

    would be if, as a developer, you had invested in lotsof Flash programming, and then Adobe just

    canceled Flash out from under you. This is one way

    of understanding why Android is open source .. it

    makes it more safe/attractive to developers. They

    can build on it, but not be subject to weird decisions

    from google. More generally various forms of "open"

    platforms are taking over (HTML, Javascript,

    Python, ...). Building your software on someone

    else's proprietary platform is like building your veryexpensive building on someone else's land, trusting

    them to play nice in the future.

    Ice Cream Sandwitch latest release, unifies

    phone/tablet OSs

    $35 Android Tablet launched in India ... the sort of

    thing that happens if your platform is open source

    (we'll see if they can really hit that price)

    Steve Jobs, Giant Episodes from career: (a) Jobs

    fosters the huge technical leap of the GUIMacintosh, but DOS beats it anyway -- Network

    Effect trumps product quality. (b) Jobs, with the

    iphone, forces the carriers away from their preferred

    charge-for-each-little-event paradigm. Having a less

    predatory attitude towards the users creates a better

    and more profitable ecosystem.

    Amazon Fire - Android that Amazon can just do this

    is a defacto example that Android is open source.

    Strategy questions for later: why is Android open

  • 7/27/2019 CS193a Android Programming

    3/4

    source vs. the closed iphone model? How does that

    impact developers? Cell carriers?

    Texting SMS vs. TCP/IP

    Lecture will go over the key ideas and examples for building Android programs, leading to a programming

    exercise on the same material. The exercises should not be too hard, just giving you chance to apply whatyou just saw. We will grade the exercises P/NC and indeed the course is graded P/NC. There was a snafu

    with the course in axess makes it appear that you can get a letter grade -- you cannot.

    Topics -- here's a rough plan. We'll use a large, working code examples for a few weeks each to explore

    the related techniques.

    Getting started: SDK, tooling, debugging, the emulator

    1. Basic Program: activities, layouts, widgets, listeners, menu commands, intents, multiple views, built-in

    animations, simple persistence. Understanding the activity lifecycle, performing correctly undersuspend/resume. Customizing the list view.

    2. Game/Animation Program: custom views, canvas, drawing, animation (all in Java)

    3. Network Program: presenting data from some network source. (a) "refresh" approach, where the user

    manually grabs the latest. Work up to using AsyncTask for this. (b) starting a background service to work in

    background more reliably.

    Class is Wed 3:15-4:45 in 320-105 new room! (campus-map.stanford.edu .. sorry, they don't support

    linking to a result. This is a case where the webapp should use GET but they use POST)

    FAQs

    How much work is this class? It should not be especially hard, since Android programming is itself not that

    hard. I like to think this reflects progress with modern languages, tools, etc. ... Android is very modern, and

    it makes many common cases easy to program. We'll walk though all the common and important techniques

    with a series of programming exercises resulting in complete programs. The class will no doubt be more

    work than a 1-unit seminar, but a lot less work than a real 3 unit engineering class.

    How much programming background is required for this class? You need to be proficient with Java

    programming. We list CS106b as the official prerequisite, although we won't be doing any C++ (heh, see"modern" above). If you know Java and have some programming experience beyond your first course you

  • 7/27/2019 CS193a Android Programming

    4/4

    should be ok.

    Is there a book? We'll provide online docs as we go + of course there's tons of available online Android

    resources. I may recommend some books for people who want supplemental materials, but I need to review

    the available books first.

    Is the class going to be taped? Currently the answer is no.

    Are you going to cover tablets in detail? Maybe, depending on how far we get. There's a bunch of

    interesting advanced topics for weeks 9-10, but it'll depend on how fast the earlier stuff goes. What iscertainly true is that we will have done many examples with the core Android architecture that reading the

    docs for the Tablet cases will present no problem.

    Licensing: this material was created by Nick Parlante in 2011. This material is released into the public

    domain -- it is free to be re-used in any way.