Week 1: Lab Overview
TABLE OF CONTENTS
Lab 1: Hello Android! Your First Android Application (50 points)
The labs for this course will require you to use Android Studio. You may use the OS of your choice, including most versions of Windows, Linux, and Mac. You can download Android Studio onto your own system or use the RKON environment available in the Lab Resources link.
Once you have the Android SDK on your system, you will then set up a new project that will be your first application. Because we are learning Android programming from scratch, we will start by creating a Hello Android application. We will make your application compatible with Android 4.0 or above because many users are still using Android 4.0, and the goal is to target the maximum number of users.
When you have finished creating your first Hello Android application, you will then upload and test your application on your Android device or an emulator. If your application does not run or does not run as intended, continue to troubleshoot your code until your application runs perfectly. If you finish early, feel free to add more to your Hello Android application. When you are happy with your application, zip up the project.
Your project will include the following.
• Open-source .java files
• A zipped project file
Save and zip your entire Hello Android work space directory files.
Grading Rubric Points
Completion of Steps 1–5 50
This lab will use the following Lab Resources.
• Android Studio
Use a personal copy of the software or to access the Lab Resources, go to the Lab Resources section of the Course Resources page.
Step 1: Installing the SDK
We will need to set up the environment you will be working on. If you choose to set up Android Studio, follow the directions below. If not, you can use the RKON environment to access Android Studio.
Downloading to Your System
1. Download Android Studio at https://developer.android.com/sdk/index.html. You will need a minimum of 2 GB of HDD space.
2. Once you have finished downloading the ADT bundle, extract the files from the bundle.
3. Set up Android Studio. Be sure to download all of the latest SDK tools through the SDK Manager; they may be helpful to you in the future. (Note: Downloading and installing every Android SDK update through the SDK Manager can take up over 16 GB of HDD space. Be sure that you have enough HDD space before you proceed.)
Android Welcome Screen
Step 2: Create a New Project
Watch the following video explaining how to start a new project:
1. Start Android Studio.
2. Navigate to New Project, and then create a new project by navigating to File > New Project.
3. In the New Project window, create an application name, project name, and package name. Also specify the minimum required SDK. It is recommended that you set this to Android 4.0 so that your application is compatible with most users’ devices. Click Next when you are finished. For all of the next screens in your configuration settings, keep the defaults and proceed “Next” until you are finished navigating through the configuration settings.
STEP 3: Hello Android XML Scripting
1. In your newly created package, open activity_main.xml.
2. Select the Hello World! text box in the Graphical Layout. In Properties, change the text so that it says Hello Android.
3. Add an additional text box by expending text fields and dragging and dropping the abc text field to your Graphical Layout. Edit the properties of the text fields, such as size, typeface, style, color, and so forth. Note: You can also edit your XML in XML code view by either double clicking on any existing text field or clicking on the XML tab, which is to the right of the Graphical Layout tab.
Step 4: Debugging
There are two methods for running your code. You can plug in your own android device and run your apps on it, or you can use the emulator.
1. Plug your Android device into the USB port of your machine. Be sure that your device is in USB Debug mode, which is located in your device settings. The USB debugging option is located in different places depending on your device, so you may need to research your device to find out how to activate it. Also, be sure that your computer recognizes your device and that the correct drivers are installed. If your computer does not have the most up-to-date drivers, you may have to visit the company website of your Android device to download device drivers.
2. Save and restart Android Studio.
3. Select your MainActivity.java code, and run your project. In the Run As window, be sure that you select Android Application and click OK. Finally, check your phone to be sure that the application launched on your device.
1. Go to Tools, Android, and AVD Manager to open the Android Virtual Device Manager. If you already have a device with a green triangle in the actions list, then you will not need to create a new one. (Note: Only create a device if all of your devices list Failed to Load.)
2. Click Create Virtual Device.
3. Choose Nexus 5 Phone xxhdpi and click Next. Be sure that x86 is listed for the system image. If not, go to the previous screen and choose a different phone with x86. Click Next.
4. Give the AVD a name or keep the default. Then press Finish.
5. You should see your new virtual device.
To Run Your Program
1. Save and restart Android Studio.
2. Select your MainActivity.java code, and run your project. Choose the emulator you just created. It will take several minutes to load the first time you open it. After it opens and your project runs, click the Home button to go back to the main screen. You do not need to close the emulator if you want to do more Android development. This will save time opening the emulator every time.
Step 5: Submission
Save and zip your entire Hello Android work space directory files (which must include all of your open-source files and your .apk file) with the name “LastName_FirstName_iLab1.”
Don’t forget to submit your lab.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at firstname.lastname@example.org.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at email@example.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at firstname.lastname@example.org.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.