Exploration Guides

We're all explorers. You just need the right guide.

EGMaps – Importing and Editing Your Program Files

Now it’s time to do the actual “programming.”  No, don’t worry.  This part is easy.  I promise.  It’s all just following the step by step instructions below.

  1. Open Eclipse
  2. Click File/Import…
  3. Scroll down and click Android/Existing Android Code into Workspace.  You might need to double-click Android if you don’t see Existing Android Code into Workspace.
  4. Click on the EGMapsSample project to select it, and check the Copy projects into workspace check box.
  5. Click Finish.
  6. In the Package Explorer window on the left, right-click on EGMapsSample.
  7. Click Refactor/Rename.
  8. Type in whatever name you like, using only letters and numbers, then hit <Enter>.  This is the name you’ll use yourself on this computer only.  It’s not a name your users will see.
  9. Double-click on the name you gave your app in the Package Explorer window.
  10. Double-click src.
  11. Right-click on com.sample.egmapssample.
  12. Click Refactor/Rename.
  13. Enter the java name for your app.  This name, which must be unique in the universe, traditionally starts with your domain name (backwards), and consists only of lower-case letters and numbers.  If your web page is on mydomain.com, for example, you would name your app com.mydomain.whatevernameyouwant.  You can have several parts after your domain name, like com.mydomain.android.bestappintheworld but always start with your web site first to ensure it stays unique.
    1. If you don’t have a web site, you can just put in anything you want for now, but you’ll need a web site eventually to upload your data files.
    2. If you share a domain for your web site, for example shareddomain.com/mypage, you can use com.shareddomain.mypage.whatevernameyouwant or com.shareddomain.mypage.android.bestappintheworld.  You just need to make sure the name is absolutely unique.
  14. Double-click on the name you gave your app.
  15. Double-click on Main.
  16. On the third line down, click the plus next to import java.util.List;
  17. Delete marked line just below it, import.sample.egmapssample.R;
  18. Double-click on AndroidManifest.xml.
  19. On the third line, change the package name from com.sample.egmapssample to your name.
  20. On this page, notice the versionCode and versionName lines.
    1. versionCode must be increased each time you upload a new version into Google Play.  You can increase by any amount you want, but have to go up by at least one.
    2. versionName is what’s actually shown to the user.  This is traditionally incremented with new versions, but not necessarily for minor bug fixes.
  21. In the Package Explorer window, double-click on res.
  22. Double-click values.
  23. Double-click strings.xml.
  24. On the fifth line, enter the full URL path for your config files.  Be sure to end with a slash (/).
  25. On the seventh line, enter the name of your config file (probably config.txt).
  26. On the ninth line, enter the name of your app.  This will be shown on the user’s Android screen with the icon, so it needs to be fairly short.
  27. On the eleventh line, enter the name of the app to appear on the opening splash screen.  This can be a little longer.
  28. On the thirteenth line, enter your copyright info.  Your app will be automatically copyrighted as soon as you created it.  Just enter the current year (or first year – current year) and your name or organization name.
  29. Click File/Save All.
  30. You may receive a dialog box saying, “The package definition has changed.  Do you want to update your launch configuration(s)?”  If you receive this, click Yes.

That’s it for the programming.  See?  I told you it was easy.  Leave Eclipse open, since we’re not quite done with it yet.  Before we can actually compile the program, though, we need to copy our graphics files into the app.

No comments yet.

Leave a Comment