Setting Up Dependencies

Set up project dependencies.

  1. Locate the MAF libraries, which are installed with SAP Mobile Platform Client SDK installer into the folder you specified during installation.
  2. Add the following MAF libraries to your Android project build path in the libs folder.
    • MAF Android libraries (HTTP REST):
      • maflogger.jar maflogoncore.jar
      • maflogonui.jar mafsettingscreeen.jar
      • mafuicomponents.jar

    Adding Dependencies
  3. Locate MAF resources, which are installed, by default, in the SAP Mobile Platform installation folder:
    • maflogonui.akplib
    • mafsettingscreen.apklib
    • mafuicomponents.apklib
  4. Change the extension of the apklib archives to ".zip". Unzip the files, which contain Android apklib Eclipse projects:
    • maflogonui-res
    • mafsettingscreen-res
    • mafuicomponents-res
  5. To add the resources to your workspace, copy the extracted folders to your workspace. Your folder structure is now similar to this:
    Folder Structure of Resources
  6. To import the resources to the Eclipse project, open Eclipse and select File > New > Project.
  7. In the New Project wizard, select Android > Existing Android Code Into Workspace, and click Next.
  8. Click Browse to select the folder where you extracted the resource projects.
  9. Select all projects, select Copy projects into workspace, then click Finish.

    Three are now three new Android projects in your Eclipse workspace:
    Adding Resources Result

    These projects do not include any source code, but do include these Android resource files:
    • Images
    • Layouts
    • Localization
    • XMLs
  10. Mark the resource projects as Android library projects:
    1. Select a project.
    2. Open the project properties.
    3. Select Android and mark the project as library by selecting Is Library.
    4. Repeat steps a-c for all the resource projects.
  11. Set up dependencies:
    1. Your Android project must reference the Android library projects from your workspace. Open the project properties of your Android project and select Android.
    2. In the Library section, click Add.
    3. Select one of the listed projects, and click OK.
    4. Repeat steps a-c for the rest of the Android library projects. As a result, the referenced Android libraries get listed in your project properties window.
    5. Click OK to save the changes.
  12. Find and add SAP Mobile Platform client libraries to your project: SAP Mobile Platform libraries are installed with SAP Mobile Platform Client SDK installer into the folder you specified during installation. Add the following .jar files to your Android project build path in the libs folder:
    • SAP Mobile Platform libraries
      • Common.jar
      • Connectivity.jar
      • CoreServices.jar
      • Request.jar
    If you use HTTP REST based communication channel, add these libraries:
    • DataVaultLib.jar
    • perflib.jar
    • sap-e2etrace.jar
  13. Locate and add Afaria client libraries to your project: Afaria libraries are installed with SAP Mobile Platform Client SDK installer into the folder you specified. Add the AfariaSLL.jar to your Android project build path in the libs folder.
  14. Locate and add Client Hub libraries to your project, which are installed with SAP Mobile Platform Client SDK installer into the folder you specified. Add the ClientHubSLL.jar to your Android project build path in the libs folder.