Join David Gassner for an in-depth discussion in this video Using the exercise files, part of Building a Note-Taking App for Android (2013).
This course is accompanied by exercise files that you can use to follow along. I've placed the exercise files on my desktop, but you can copy them anywhere on your hard disk. The exercise files include one folder for each of the course's chapters. And within the folder, you'll find zip files. Each of the zip files is an Eclipse archive project that you can import into Eclipse when you're using the Android developer tools. For example, the O3 getting started folder has a zip file called launcher icon. And, if I go back a level.
And then go the chapter, Data Model. I'll find four ZIP files, for each of the four exercises in that chapter. To use one of the exercise files, go to Eclipse with the Android Developer Tools, and I'll describe how to install that early in the course. From the menu, File > Import. In the Import dialog, go to the General category, select Existing Projects Into Workspace and click Next. Now, click on Select archive file.
Click browse navigate to the Exercise Files and go to the folder you want to work with. I'll go to 04_DataModel. Then, choose the project archive file for that exercise. So I'll open one called RetrievingData. Then follow the rest of the prompts to complete the import process. You should then be able to open up the project tree in the Package Explorer view, and open the source folder in its Java classes, and the RES or resources folder, and find all of the applications resources. After importing any of the projects from the exercise files, if you see a series of red warnings indicating that Java classes aren't being recognized, it typically means that there's a problem with the Java compliance level. It's a common issue when you have Java 7 installed. To fix it, go to the Project Properties to the Java compiler section. And change your Java compliance level from 1.7 to 1.6. After saving the change, the errors should be cleared. To run the application, click the Run button. The first time you run a button after you've imported it, you'll see this dialog, the Run As dialog.
Choose Android Application. If you have an Android device conected to your computer and you've enabled it for USB debugging, you'll be able to load the application on the device and see it running. Or you can use the Android Emulator. I'll describe how to use the emulator throughout the course and show you how to create a variety of virtual devices to reflect the different screen sizes, pixel densities, and versions of the Android operating system. Once you're done with an exercise, you can close a project by right-clicking on it in the Package Explorer and selecting Close Project. Or, you can remove the project from your workspace completely by right-clicking and choosing Delete.
If you don't want to Delete the project contents, leave this checkbox unchecked. Click OK and the project goes away. But it's still there on your hard disk, and you can re-import it later. The course is designed so that you can work through all of the exercises from beginning to end using a single Eclipse project. Or if you prefer, you could open up each project for each individual exercise to make sure you're at the right point. It's up to you. The exercise files also include a solutions folder. And you'll see the same set of chapters there. But the zip files there are the solution projects, the finished version of each exercise.
I've named these with the suffix of _solution so that you can open them at the same time in Eclipse as the starting project because you can't have two projects of the same name. You can then compare the two bits of code. Finally, there's an assets folder. The assets folder contains one subfolder called logo. And there you'll find a graphic that I use as the application's launcher icon. There are two versions. One with square corners, and one with rounded corners.
And I'll describe why those exist, later in the course. So those are all the assets that you'll find in the Exercise Files. The course is designed, so you can work through and build the app yourself following along with each video. There are no typing help files. You'll do all the coding yourself. And at the end of the course, you'll have a complete working app. The app has already been distributed through the Google Play store, and the Android app store. So you can't take this version of the app and deploy it yourself, but you can take the lessons you've learned and apply them to your own Android apps.
Like its companions, this course will take you through building a complete mobile app from scratch; but this installment uses the Android SDK and Java to get the job done. Author David Gassner shows you how to install the SDK and the Android Developer Toolkit, create a project, save data on a device, build and control screen layouts, and create action bars and icons that control navigation.
These three related courses will use the same assets to develop the same app. (See Building a Note-Taking App for iOS and Building a Note-Taking App for Windows Phone 8 and Windows Store for more information.) Compare and contrast the different steps and discover the similarities and differences!
- Previewing the note-taking app
- Creating virtual devices for testing
- Unique concepts in Android
- Creating the Eclipse project
- Using local data storage
- Adding and retrieving data with the Shared Preferences API
- Creating screen designs
- Creating and editing notes
- Supporting older versions of Android with ActionBarSherlock