Thursday, June 19, 2014

Week 3: Lesson 6: Integrating The List Menu and Expanding Knowledge of Java Activities

Lesson 6: Integrating The List Menu and Expanding Knowledge of Java Activities
INTRODUCTION
In this lesson you will expand your knowledge of Java by learning how to integrate the List Menu into the application. You will also learn how to create the list menu and arrange the items and their corresponding Java files within the code. In this lesson you will also learn how to create new activities with a variety of intents and learn how to edit the Android Manifest to support these new activities. The videos in this lesson will support these components and provide an opportunity for you to edit and create your own code for the application.

LESSON OBJECTIVES
By the end of this lesson, you will be able to:
Section #1: Working with Layouts In Java
1.     Review the components of the ListActivity layout and edit.
Section #2: Creating Activities and Understanding the Activity Lifecycle
1.     Compose activities in your Java for Android project.
Section #3: Understanding Intents
1.     Describe the purpose and types of intents in Java code.
2.     Describe and analyze the purpose of overrides in Java.
3.     Construct a list menu and expand activities.
Section #4: Video Demonstrations: Expanding on Classes, Activities & Overrides

LEARNING SEQUENCE

Required Reading
Read the following:
·      Section #1:

·      Section #2:



·      Section #3:
Resources
View the following: 
·      Sample Code
·      Video Transcripts
Assignments
Complete the following:
·      Describe the intents that you see in your current mobile application.
·       What do you need to understand about the relationship between the classes and the overrides necessary for the function of the list menu?
·      Describe the editing of the code we did in the Android Manifest for the activities in this project.


INSTRUCTION

Section #1: Working with Layouts In Java

In this section, you will learn what it takes to create the ListActivity which will enable you to be able to create the list of items on the menu of the application.
Step 1.
The ListActivity class helps to create the layout of the mobile application you are working on. Read through this resource to better understand how the ListActivity binds the data within the Java code.

Step 2.
Complete Assignment #1: Describe the intents that you see in your current mobile application.

Section #2: Creating Activities and Understanding the Activity Lifecycle
In this section, you will learn how activities are created and what the components of the Activity Lifecycle are and how understanding how they will benefit your development process.
Step 1.
Read: Activities
This web page provides an overview of activities and how they are created. There are descriptions of how activities are created and how the activities are linked to the creation of the user interface. There are also directions for adding the activity into the Android Manifest file and managing the Activity Life Cycle.

Step 2.
Review this resource which provides an overview of what an activity is in Java for Android. This resource will help you understand that activities are single actions that a user can engage with on the user interface. This reading will provide you with an overview of how activities are initialized and the components of the activity life-cycle.

Step 3.
This reading provides an overview of what an override is in Java and what it does. This reading provides a step-by-step overview of what an override looks like and how it can benefit you in development with Java.

Step 4.
Read: Override
This resource provides the description of the @override code and how an error will be created if the override does not override the superclass. This resource is beneficial to help you understand some of the sample code you will be entering as part of this lesson and the video tutorials.

Step 5.
Complete Assignment #2: What do you need to understand about the relationship between the classes and the overrides necessary for the function of the list menu?

Section #3: Understanding Intents
In this section you will gain an overview of intents and how they are integrated into Java for Android projects. You will learn about the different ways intents are used with activities.
Step 1.
This reading will provide an overview of intents and how they are integrated into a Java for Android project. This reading also provides examples of how intents are created and how the Android Manifest should be edited to identify intents.

Step 2.
This reading provides an additional overview of intents but also includes a section on filters. Be sure to review the section entitled Types of Intents. Review this page fully from the top. This reading will provide a deep review of how intents work and will provide deeper insight into the code you are working with in this lesson.

Step 3.
Complete Assignment #3: Describe the editing of the code we did in the Android Manifest for the activities in this project.

Section #4: Video Demonstration on Expanding on Classes, Activities & Overrides

In these two video tutorials you will learn how to create the list menu and expand the amount of activities in your application project. You will also learn how to edit the import overrides in the sample code to add to your knowledge of classes. Please pause and review the video, as necessary, to complete tasks. Transcripts are provided.

Step 1.
View & Practice: Lesson 6, Part 1 [12:36]
In this first video you will learn how to create a new Java file and create a new class.
You will use some sample code to learn the components of the code in this lesson. You will learn how to set up the Android Manifest to run the Java files in the right order for compiling. You will also learn how to edit the codes in the overrides that had been created for you.

Step 2.
View & Practice: Lesson 6, Part 2 [14:45]
In this second video you will be introduced to the different classes with the ListActivity. You will learn how to type out the intents to show the menu of list options in the layout. Additional editing of the Android Manifest will be done to support the new activities in the project.

SUMMARY
In this lesson you have been introduced to the list menu and how the menu will connect the other Java files you have created to this point. You have also learned that, as you add these components to your application, you are generating new activities which are part of the “life- cycle” of the application. You have also been provided a firm base in the operation of overrides in Java and the integration of intents for better understanding the code you are working with. In the next lesson you will learn what sensors are and how they can be integrated into your application.
ASSIGNMENTS
·      Describe the intents that you see in your current mobile application.
·       What do you need to understand about the relationship between the classes and the overrides necessary for the function of the list menu?

·      Describe the editing of the code we did in the Android Manifest for the activities in this project.

Week 3: Lesson 5: Creating a Logo in Java, and Connecting the Classes in the Android Manifest

Lesson 5: Creating a Logo in Java, and Connecting the Classes in the Android Manifest
INTRODUCTION
Using a series of four video-based tutorials, this lesson leads you through the following tasks and processes. First, you will understand how icons are integrated into an Android application and a logo image is added to the layout. You will also learn what you will need to know about designing icons for Android applications. Second, you will be introduced to the Java class for integrating the MediaPlayer into the application by creating a new public class. Finally, you will learn how to create a new XML file within the application and then edit the Android Manifest to bring all of these changes together.

LESSON OBJECTIVES
By the end of this lesson, you will be able to:
Section #1: Understanding Icons & Launcher Graphics in Java For Android
1.     Explain the importance of application icons in your application. Reading: Iconography.
Section #2: Working with Classes
1.     Explain what a public class is and how it works within Java.
2.     Define what the MediaPlayer class does in Java for Android.
Section #3: Understanding The Android Manifest
1.     Practice how to link XML to Java class
2.     Determine how to set up buttons in the Java class
Section #4: Video Demonstrations: From Designing Icons to the Android Manifest 

LEARNING SEQUENCE

Required Reading
Read the following:
·      Section #1:

·      Section #2:


·      Section #3:
Resources
View the following: 
·      Sample Code
·      Video Transcripts
Assignments
Complete the following:
·      Explain the importance of Android application icons
·      What is a public class? What are some of the different class instances?
·       How does the Android Manifest address the concept of “hierarchy” within the application?

INSTRUCTION

Section #1: Understanding Icons & Launcher Graphics in Java For Android

In this section you will be introduced to what an icon is and why it is important to the branding and identity of an application. This section will begin to show you how the graphics integrated into your application will be used to represent an app marketplaces.
Step 1.
An icon is a graphic that takes up a small portion of screen real estate and provides a quick, intuitive representation of an action, a status, or an app. Read through the entire website to understand important design principles and understand how and why graphics and icons are central to your app. This reading covers all of the most common kinds of icons that you will need to develop ad use, including the logo, action bar, contextual and notification icons. Consider technical and design issues of size and scale, use of color, focal area, proportions and style.

Step 2.
Complete Assignment #1: Explain the importance of Android application icons

Section #2: Working with Classes
In this section, you will begin to better develop an understanding of what the syntax of a class is in Java. This knowledge will not only make you a better programmer but will assist you in expanding your knowledge of Java beyond Android development.


Step 1.
Read: Class
This resource provides a description directly from the Java for Android website. The definition provided here describes the details of querying class-related information of the three different class instances. Read through the web page to understand the three different class instances: those representing real classes and interfaces, those representing primitive types, and those representing array classes.

Step 2.
This reading extends the metaphor of a bicycle to explain classes. Go through the tutorial to gain a better understanding of additional concepts such as inheritance, an interface and a package. At the end of the reading and tutorial, you can test your knowledge of object-oriented programming concepts. Be sure to check your answers by clicking the Check Answers link.

Step 3.
Complete Assignment #2: What is a public class? What are some of the different class instances?

Section #3: Understanding The Android Manifest
In this section you will learn how to edit and manage the elements of the Android Manifest File. You will learn how this page of code becomes the “heart” of the application.
Step 1.
This is a description of the MediaPlayer class from the Android website. This page provides a summary of the use of the MediaPlayer class and the different states of the MediaPlayer within Java. This page provides a thorough overview of the lifecycle of this class.

Step 2.
This reading provides an overview of the AndroidManifest.xml, which is the root of the project hierarchy in Android applications. This reading will help you understand the importance of the file and learn how to define the components of metadata in your application.

Step 3.
Complete Assignment #3: How does the Android Manifest address the concept of “hierarchy” within the application?

Section #4: Video Demonstration on Designing Icons, to the Android Manifest 

This series of four video tutorials will guide you through the following processes and tasks as outlined below. Please pause and review the video, as necessary, to complete tasks. Transcripts are provided.

Step 1.
View & Practice: Lesson 5, Part 1 [11:18]
Demonstrates how to edit application icons and logos. In this video you will learn how to edit the icon and logo for the application and learn which folders they should be saved within (res folder). You will also be prompted to edit all the icons in the folders. You will also understand the difference in resolution between the icons based on the devices that they may be shown on. You will then create the logo page graphic for the application and placed this into the same folder as the other graphic. At the conclusion of this video, you will add an mp3 file into the raw folder (created earlier in the lesson) and then locate that folder into the res folder.

Step 2.
View & Practice: Lesson 5, Part 2 [6:28]
Shows how to prepare a new XML file for the layout of the logo. Within the Eclipse IDE, you will create an XML file for logo in layout folder. You will add the logo.png in the new XML file and save your project. Sample code will be used to introduce the public class and you will be shown where to add this code to continue in the next video.

Step 3.
View & Practice: Lesson 5, Part 3 [9:20]
Demonstrates how the class for the MediaPlayer and logo works in the Application. You will review how the MediaPlayer class is placed into the Java code and will walk through how to create the necessary overrides to make the music in the application play.

Step 4.
View & Practice: Lesson 5, Part 4 [3:30]
In this video-based tutorial, you will demonstrate how to create a new Class and a new XML file. You will begin editing the Java and Android Manifest of your application. You will also learn how to integrate the MediaPlayer class into the application and then you will learn how to edit the code of the Android Manifest to work with the other Java files created.

SUMMARY
In this lesson you have been introduced to the application icon and how to integrate the logo graphic which will represent the application on the home screen of the device. You have also learned about the public class in Java and some of the variety of different instances and the “object orientated” approach of the Java language in Android applications. This lesson draws together the variety of graphics, media and layout components that will make your application unique and provide a base for understanding how the XM layout, Java programing and manifest will work together.

ASSIGNMENTS
·      Explain the importance of Android application icons
·      What is a public class? What are some of the different class instances?

·      How does the Android Manifest address the concept of “hierarchy” within the application?