1 / 68

Android 5: Making th e App

Android 5: Making th e App. Kirk Scott. Outline. 5.1 Introduction 5.2 Importing the Copy of FlashCard 5.3 Copying Picture Files, Sound files, and the .XML File 5.4 Creating the App 5.5 Renaming the App 5.6 Summary. 5.1 Introduction.

sanaa
Télécharger la présentation

Android 5: Making th e App

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Android 5: Making the App Kirk Scott

  2. Outline • 5.1 Introduction • 5.2 Importing the Copy of FlashCard • 5.3 Copying Picture Files, Sound files, and the .XML File • 5.4 Creating the App • 5.5 Renaming the App • 5.6 Summary

  3. 5.1 Introduction

  4. This set of overheads covers the most difficult and troublesome aspects of this seminar • As already noted, the goal of the sets of overheads is to make it possible to make an app without being a programmer

  5. Already, Eclipse, the most basic piece of software needed, has been mentioned • It has to be installed, but it is simply impossible to become a master of this piece of software unless someone is, in fact, a skilled developer

  6. In short, the problem is this: • It is necessary and desirable to get everything set up and provide the minimum knowledge necessary to create an app • Unfortunately, things will inevitably go wrong • Without additional background knowledge, it is extremely hard to figure out what was wrong

  7. The author of these overheads has tested the sequence of steps that will be presented • This sequence of steps has worked • However, in honesty, occasionally problems have arisen • It has been impossible to tell whether the author made mistakes in executing the sequence or whether there were other, technical problems

  8. Because the author is a developer, it was ultimately possible to resolve problems and make progress • But for someone whose only knowledge is the information contained in these overheads, unforeseen problems will be frustrating and seemingly insoluble • The only realistic approach in those cases is to close Eclipse and start over from scratch

  9. This presentation will not attempt to include a live demonstration of the steps • If people want to see these steps in action, they will be demonstrated separately, one-on-one or in small groups • There is too great a chance of failure, confusion, and wasted time to risk trying to demonstrate the steps during the presentation

  10. 5.2 Importing the Copy of FlashCard • There is a copy of the flashcard app which has all of the custom content removed • It is named Copy of FlashCard • It will be made available to seminar participants • It can be copied into the location of choice on the machine that will be used to create an app

  11. In brief, this is what it does contain: • The .java files containing the logic of the app • The layout files which define how the different screens of the app appear

  12. General resource files for content that would be common to any implementation of the app • An example of general resource files would be nopicture and nosound, in case any user wanted to make flashcards which didn’t include pictures or sounds • Other system-supplied common resources are also in the Copy of FlashCard

  13. In order to make a flashcard app it will be necessary to import this copy which doesn’t contain content • After it’s been imported, content can be copied to it • The following overheads go through the steps for importing

  14. The following screenshot shows the Eclipse interface

  15. In the File menu, take the Import… option • What you see is shown in the screenshot on the following overhead

  16. The default, “Existing Android Code Into Workspace” is what you want • When you click next, this is what you see:

  17. You click on Browse… and navigate to the location where you have saved Copy of FlashCard on your machine • This is shown on the following overhead

  18. When you click on OK, this may be what you see:

  19. If so, click the checkbox to the left of the project • Or you may not have to do this step and you will already see what’s shown on the following overhead:

  20. Make sure to also click the checkbox for “Copy projects into workspace”

  21. Then click the Finish button • A screenshot of the resulting Eclipse interface is shown on the following overhead • Notice that CopyOfFlashCard now appears in the project explorer

  22. On the overhead following the next one the project explorer will be shown again with the folders open which will be critical to the next steps

  23. These are the critical folders: • src (containing MainActivity.java, for example) • res/values-hdpi (containing ic_launcher.png, for example) • res/raw (containg nosound.mp3, for example)

  24. 5.3 Copying Picture Files, Sound files, and the .XML File • The next step is relatively straightforward • You need to remember where the folders are where you saved the picture files, the sound file, and the .xml file you made with FlashCardMaker • You can find them using the regular file explorer in Microsoft Windows • You can then copy and drop the files into the right folder in the Eclipse project explorer

  25. So, find your picture files • Select them, right click, and copy • Open the Eclipse project explorer • Put the mouse over the res/values-hdpi folder • Right click and paste • The results are shown in the screenshot on the following overhead

  26. Find your sound files • Select them, right click, and copy • Open the Eclipse project explorer • Put the mouse over the res/raw folder • Right click and paste • The results are shown in the screenshot on the following overhead

  27. For the purposes of demonstrating this I made a file named testimport.xml using FlashCardMaker • testimport.xml contains all of the same information as the full FlashCard app, but the colors come in a different order • This has to be copied into the res/values folder • The results are shown in the screenshot on the following overhead

  28. 5.4 Creating the App

  29. The importing step may or may not have caused some troubles • The copying step should have been trouble-free • The creating step is the one where you are most likely to discover that something has gone wrong

  30. Strictly speaking, the creating step is the last step that a developer would take • In other words, for us, it is a developer step that is unavoidable, even though we aren’t developers • The error messages or problems that might result will likely not be clear

  31. If no other help is available, starting over from the beginning is the only option • However, if this fails, then it would be necessary to turn to somebody with Android development knowledge in order to navigate your way through the problems and get successful results • For better or worse, this is the weakest link in the chain

  32. What you want to do next is find MainActivity.java in the src folder • Open it by double clicking on it in the Eclipse project explorer • The result of doing this is shown on the following overhead • (You may just ignore the content of the file that’s shown. It’s Java code.)

  33. In the Project menu select the “Clean…” option • In it, make sure that the Copy of FlashCard project is checked and that “Start a build immediately” is checked • This is shown on the following overhead:

  34. Click “OK” • A screenshot of the environment is shown again on the next overhead • Notice the tab at the bottom: • Problems • If there are no problems, this is a successful outcome

  35. If there had been problems, they may have appeared under the Problems tab • They may also appear under the Console or the LogCat tabs

More Related