Creating the Android Project

Create a new Android project in SAP Mobile WorkSpace. Add library resources to the project and set other application properties.

Prerequisites
To help create your project—and in a subsequent topic, build the user interface—download the SMP101 Android Object API (2.3) example project from the SAP Community Network (SCN) Web site at http://scn.sap.com/docs/DOC-8803.
Task
  1. Start SAP Mobile WorkSpace.
  2. In SAP Mobile WorkSpace Preferences, set the Android SDK location.
  3. Select File > New > Project.
  4. Select Android > Android Application Project, then Next.
    If you have a version of Android other than the one used to design this tutorial, the screens you use to enter the information in the next several steps may be in different screens.
  5. In the Creates a new Android Application page of the New Android Application wizard, use these values and then click Next.
    • Application Name – enter SMP101Android.
    • Project Name – enter SMP101Android.
    • Package Name – enter com.mycorp.smp101.android.app.
    • Minimum Required SDK – accept the default.
    • Target SDK – select the Android SDK used for the tutorial.
    • Compile With – select the Android SDK used for the tutorial.
    • Theme – accept the default.

    Android Tutorial New Android Application Window
  6. In the Configure Project page, use these values and click then Next.
    • Select Create custom launcher icon, Create activity, and Create Project in Workspace.
    • Unselect Mark this project as a library and Add project to working sets.

    Android Tutorial Configure Project Window
  7. In the Configure Launcher Icon page, accept the default settings and click Next.

    Android Tutorial Configure Launcher Icon Window
  8. In the Create Activity window select Create Activity, then select BlankActivity, and click Next.

    Android Tutorial Create Activity Window
  9. In the New Blank Activity window, use these values and click Finish.
    • Activity Name – enter SMP101SampleActivity.
    • Layout Name – enter main.
    • Navigation Type – accept the default of None.

    Android Tutorial New Blank Activity Window
The left pane of the Workspace Navigator should list the SMP101Android project. In the src folder, a default Sample Activity class was automatically generated when you created the project.
Tip: To correct a misspelled package name, right-click the package and select Refactor > Rename to change the name and update all references.