Want to be the next Nick D'Aloisio who at the ripe old age of 17 sold his smartphone app to Yahoo for $27 million?

Want to know the ins and outs of rolling your own Android app?

Want to develop your own app as part of a group project

Then read on ....

Awards 2020

Each year we recognize the best project, most beautiful UI and best hacker in the class. Congratulations folks.


The coolest technology to emerge over the last decade is the smartphone -- its had a huge impact on our lives. Today, 3/4 of all Americans own a smartphone and I bet you are reading this webpage on your phone, no?

If you've been curious about programming phones and creating great apps then this course is for you. We'll focus on programming Android phones -- sorry iPhone users.

The course is heavy on programming. The prerequisite for this course is Computer Science 10 (no exceptions given).

This is more like an intense Android Bootcamp than a class. It's a bootcamp with a project phase where you hatch your own idea and roll your own app in teams of two.

Spring 2020

All my lectures for the class are recorded and available on Canvas: Smartphone Programming (SP20). Enjoy.

Teaching Team

Both TAs are experienced Android programmers and super nice people. Proud of these guys. Subigya Nepal , Weichen Wang


First, if you feel anxious or stressed about the class contact me ASAP and I can assure you a chat with me will remove those feelings.

We intend to have fun this term even in these difficult times. To make things less stressful (there is a lot of coding/debugging in this class) you can pair code all the MyRuns assignments with one other student. You can meet on Zoom discuss code, problems, share solutions, bugs, etc., but you have to write your own code and submit it. This will help counter a sense of isolation while hacking. The CodeIt assignments (which are quick small assignments that reinforce techniques (unit testing, edge cases) have to be done by yourself. Projects are group oriented. As a result, there is a lot of opportunity for you to connect with other students in the class, the TAs and yours truly.

The top 2 students can keep their phones as a keepsake.


Lectures will be on Zoom in the alloted times and recorded and made available on Canvas.

What we'll teach you

The goal of this course is to teach students how to design, implement, test, debug and publish smartphone applications on java based android phones. Students will learn how to take their innovative ideas from conception to the android market through a series of rigorous hands-on programming assignments and group projects.

This is an introductory course aimed at undergraduate students (but graduate students are most welcome) who have Java programming experience. However, there is a significant amount of programming in this course requiring a commitment on the part of the student.

Topics covered: the android development environment including the Android Studio IDE; key programming paradigms; UI design including views and activities; data persistence including SQLite; content providers; messaging and networking; phone sensors, location based services (e.g., Google Maps), background services; broadcast receivers; cloud programming; and publishing applications to the android market.

Android programming concepts are reinforced through a set of thematic programming exercises that introduce these topics and incrementally allow the student to build a complex application; that is, programming labs form a set of components that collectively implement a continuous sensing application. The resulting phone app allows user to log their exercises (e.g., walks, runs) and display them on Google maps.

A key part of this course is group projects where students will work in small teams onjoint problem solving. This should be a fun, creative and group-oriented experience. You will need to be organized to do well in the allotted time.


Computer Science 10 (no exceptions). Android is based on Java programming.

We are using Piazza (through Canvas) for information dissemination and Q&A

We will use Canvas mostly to disseminate grades and to connect you to Piazza. The best way to get answers to programming problems is crowdsourcing -- so the first time someone comes across a problem and we know the answer - everyone sees it. I encourage students to actively use Piazza -- it's a great system. All class announcements will be through Canvas/Piazza.

Coursework and grading

The coursework is as follows: There are a number of longer thematic labs (MyRuns) and shorter programming assignments (CodeIts), weekly Monday quizzes and a group project.

Checkout the grading rubric for the programming assignments plus design and coding advise.

60% - Thematic programming exercises

There are 5 weekly programming assignments over the first 7 weeks. These labs are designed to help students learn the android programming environment and key programming paradigms. MyRuns1 through MyRuns4 will be graded and MyRuns5 is optional. We are making it an optional to reduce the workload. Note, MyRuns5 is related to using the Firebase cloud which is key to the project phase. Students can either do MyRuns5 or learn the material for the project phase.

Labs are graded on completeness of the required features, the correctness of the functionality, and the robustness: note, if your lab crashes it will not be graded and you will have to resubmit a working version with 10% penalty against your lab grade. Please make sure there are no crashed in submitted code -- that is the take home

You should download, inspect and run all code examples in the notes (.zip files) to fully understand concepts and patterns taught in class. However, you cannot under any circumstances ``cut and paste'' these examples into your solutions for your submissions. You should use these coding examples as a learning tool; always code your own intrepreation of these coding examples in your solutions if you choose to use the patterns; that is, look at the code and understand how it works but always code your own versions of these patterns if you use them in your solution. If you cut and paste any class code there will be a 10% penalty and you will have to recode and resubmit your lab.

The MyRuns document captures the complete app specification and lab assignment information. You should read through the design specification for the complete MyRuns app a couple of times before starting the lab sequence. For each lab we give you a running example of the solution called an APK. Your job is to functionally replicate each APK.

15% - CodeIts

We will have 3 short assignments called CodeIts. These super short assigments do not require you to write much if any code and cover finding edge cases, debugging, unit testing and profiling code. We will grade CodeIts simply. We will only look at functionality -- does the app do what we asked. If it does not work at all you get 0. If it partially completed the CodeIt you get 50%. If you complete it you get 100%..

25% - Group projects

Students will develop their own app.

Projects are made up of a small (2 people) teams and require strong collaboration and a problem solving mindset. The goals of this activity are to help you develop the confidence, skills, and habits necessary to write real phone apps while part of a multi-person team.

Each team member will get the same grade assuming all goes well. The grade will breakdown as follows:

Grading Rubric

Your final percentage grade will be translated to a letter grade using the following table.

Submission of programming assignments

We use the Dartmouth Computer Science Gitlab Server for submission of assignments. You will need to go to the server and sign up using your Dartmouth mail addresses - not gmail. You will need to add the TAs to your CS65 repos.

Here are the detail instructions for submitting using git.

Note, we take a snap shot of your repo at midnight on the submission date. So to submit you have to make sure you add and commit all your local files so your repo is up to date at 11.59 pm. Please make sure your code works and does not crash.

Policy for late assignments

You should always aim to get your lab in on time.

Penalties: < 8 hours: 10%; < 24 hours: 20%; < 48 hours: 40%; more: no credit.

Under extenuating circumstances, alternative arrangements may be made with the instructor, if possible before the due date.

Our late policy seems a bit harsh at first but here's the reasoning. Each lab builds on the previous lab so falling behind is a taxation unto itself. To balance this late policy I add this sweetner: you get two free 24 hour pass without penalties. These are atomic units -- you can't divide them up, before you ask. Take it when you like but put a note in your README.txt file and email the TA.

It is not good to fall behind because it limits the time you can spend on the next lab which comes out as you finish the current one. Therefore, three final pieces of advice:

  Don't fall behind in this course.
  Don't fall behind in this course.
  Don't fall behind in this course.

Policy on Joint Work and the Dartmouth Honor Code

We hate to state this since you all know it but it is necessary to be explicit here:

You would be amazed at how easy it is to tell when people work together on problem sets, particularly coding exercises. Think about the simple shell commands we run against your source code from labs and projects to compare your lab assignments and projects against every other assignment and project ever submitted since this course started - it takes less that a millisecond to run these checks - no effort on our behalf.

We use the moss tool from Stanford to run regular checks against all submitted code. To quote the website

"Moss (for a Measure Of Software Similarity) is an automatic system for determining the similarity of programs. To date, the main application of Moss has been in detecting plagiarism in programming classes. Since its development in 1994, Moss has been very effective in this role. The algorithm behind moss is a significant improvement over other cheating detection algorithms (at least, over those known to us)"

Similarly, we know how to use Google too. You should not under any circumstance look at or use code from students that have previously taken CS65. The message is simple - please don't make life unpleasant for all of us by breaking these rules. The penalties for cheating at Dartmouth are severe, starting with suspension and including expulsion. If students cheat I will immediately give them a failing grade for the course and will push for their suspension from the college. The most depressing part of my academic career was catching two really nice students cheating -- they recieved failing grades from me and were suspended by the college. Please please please do not do this at any cost.

We take the Honor Code very seriously, so please, if you are unclear on any matter regarding this policy, do not hesitate to see me in office hours, and we will be more than happy to answer your questions.

Ok I'm glad I got that off my chest ...

Coding style

Please write clean code using good coding styles. As the course moves on you will get dinged for poor coding styles. Checkout this single guideline for advise:

Android code style guidelines (1) and (2)

Also, checkout a summary of design and coding tips.

Group Project

Group projects are made up of 2 students.

During x-hour week 6 we will give an overview of how the Firebase ML Kit can supercharge your app. This might give you ideas for your pitch.

During x-hour week 7 each group will sharing their idea with a 2 minute/2 slides pitch. Send Professor Campbell a link to your Google Slides before x-hour.

The grade will breakdown as follows:

Your project webpage will serve as running blog on your project progress and will graded for completeness. All code should be stored in a git repo called project.

There is a focus on working code and a demoable app. Key rule for demo day: the professor should be able to download app and it should work off the shelf.

See 2019 projects

MyRuns project document

The MyRuns document captures the complete app specification and lab assignment information. Please read this a couple of times and refer back to it.

Asssigments Due Dates

Assignment       OUT                IN (DURATION)

CodeIt1          Friday 04/03       Sunday 04/05    11.59 PM (3 days)
MyRuns1          Monday 04/6        Sunday  04/12   11.59 PM (7 days)
CodeIt2          Monday 04/13       Wednesday 04/15 11.59 PM (3 days)
MyRuns2          Monday 04/13       Wednesday 04/22 11.59 PM (10 days)
MyRuns3          Thursday 04/23     Sunday  05/03   11.59 PM (10 days)
CodeIt3          Friday 04/24       Sunday 04/26    11.59 PM (3 days)
MyRuns4          Monday 05/04       Wednesday 05/13 11.59 PM (10 days)
Project_Pitch    Wednesday 05/06    
MyRuns5          OPTIONAL           Sunday  05/17   11.59 PM  
Projects         Monday 05/18       Wednesday 06/3 (demo day) (2.5 Weeks)


We are going to try something different here. Most support is going to revolve around coding, debugging, problem solving, being stuck. Remote debugging over Zoom and traditional office hours will not work. Here is what we plan to do. We plan to support three types of engagment (see below). Students will need to find a coding partner in the first week (don't stress, we can help put people together). The student groups (pairs of two) will be assigned a TA (Weichen or Subigya) end of the first week.

We have assigned you to one of the TAs for office hour support -- see Canvas

Section Schedule

Your assigned TA will preview the assignment on the day it is released. This is a single Zoom session for all groups assigned to a TA. The times of the sessions are below.

   MyRuns1      6-7 PM Monday, 04/6
   MyRuns2      6-7 PM Monday, 04/13
   MyRuns3      6-7 PM Thursday, 04/23
   MyRuns4      6-7 PM Monday, 05/04

Check_in_1 Schedule

This will be a 1:1 session with each group assigned to a TA and is scheduled at the mid-point of the assignment period. Groups will set up a time with the TA for a 30 min session each week. The date of the session is below. Your TA will set up a time with you.

   MyRuns1      Thursday, 04/9
   MyRuns2      Saturday, 04/18
   MyRuns3      Wednesday, 04/29
   MyRuns4      Saturday, 05/9

Check_in_2 Schedule

This is the day before your assignment is due and is a 1:1 session with your assigned TA; again, one group has a 1:1 session with their TA to help debug last time issues before the assignment is due. The date of the session is below. Your TA will set up a time with you.

   MyRuns1      Saturday, 04/11
   MyRuns2      Tuesday, 04/21
   MyRuns3      Saturday, 05/02
   MyRuns4      Tuesday, 05/12

We plan to try this appoarch first and adapt as needed..


Please read the FAQs.

Week 1 -- Live coding a simple fun app together

All video lectures are available through Canvas

Week 2 -- UI is King

Week 3 -- More UI

Week 4 -- The Database and Threaded Design

Week 5 -- Loaders, Threads and Geo-Location

Week 6 -- MR4 Plumbing: Maps, Services, Activity Recognition, Notification and Broadcast Receivers

Week 7 -- The Cloud: The Magic of Firebase

Week 8-10 -- Projects!

Cheap online Android programming book

Coursebooks are outrageously expensive. Much of the knowledge needed for this class are in the notes and code. However, Android programming is a fast moving area and I stronly recommend an online book for only $20.00.

The Busy Coder's Guide to Android Development

Cost $20.00. This buys you the book and 6 month access for updates.

We will supplement the course notes with specific chapters from this book. Note, it's a huge book, don't be intimidated.

I like the online book because you pay once and you get the revised versions if updated. This is important because the APIs are still fluid. Many APIs are being added and depreciated at the same time. So the book at least quickly tracks major changes.

Spring Term 2020

March 30, Monday -- Spring term classes begin

May 25, Monday -- Memorial Day, College Holiday (no classes held)

June 3, Wednesday -- Spring term classes end

June 5, Friday -- Final Examination period begins

June 8, Monday -- Scheduled Final Examinations end

June 9, Tuesday -- Final Examination period ends