Creating the Android Project

Create a new Android SUP101Sample project in Unwired WorkSpace. Add library resources and set other application properties.

Prerequisites
Obtain text files from the SUP_Android_Custom_Dev_Tutorial_code.zip file to help create the project and, in a subsequent topic, build the user interface.
Task
  1. Start Unwired WorkSpace.
  2. In Unwired WorkSpace Preferences, set the Android SDK location.
  3. Select File > New > Project.
  4. Select Android > Android Project, then Next.
    Depending on the Android version you are using, the information you provide in the next several steps may be in one or two screens.
  5. In the New Android Project wizard, use these values and click Next.
    • Project Name – enter SUP101Sample.
    • Select Create new project in workspace.
    • Change Use default location if it does not display the appropriate workspace location.

    Android Tutorial Create Android Project Image
  6. In the Select Build Target window, click an Android version 2.2 or later and Next.


  7. In the Application Info window, verify or enter the information and click Finish.
    • Application Name – SUP101Sample
    • Package Name – enter com.sybase.sup.samples.objectapi
    • Create Activity – SUP101SampleActivity
    In the left pane, you should see the Package Explorer with the SUP101Sample project listed. In the src folder a default Sample Activity class is automatically generated for the project.
    Tip: To correct a mispelled package name, right-click the package and select Refactor > Rename to change the name and update all references.
  8. Add a compiler resource and library resources to the root directory of the Android project:
    1. In Package Explorer, select SUP101Sample and add a libs folder.
    2. In Windows Explorer, browse to C:\Sybase\UnwiredPlatform\MobileSDK213\ObjectAPI\Android.
    3. Copy the armeabi folder and all JAR files.
    4. In the libs folder, paste the armeabi folder and JAR files.
  9. In Package Explorer, modify the build path to point to the correct location for the ClientLib.jar, sup-client.jar, and UltraLiteJNI12.jar files for the project:
    1. Select the SUP101Sample project.
    2. Select Project > Properties > Java Build Path.
    3. Select the Libraries tab.
    4. Click Add JARs.
    5. In JAR Selection, expand the SUP101Sample\libs folder.
    6. Select the JAR files, then click OK.
    7. Click OK again.

    Android Tutorial Add Java Build Path Image