Importing Libraries to your Android Application Project

Reference the libraries required for the Android application project.

  1. Download the SDK/ ODP library files to your host development system.
    For Online Data Proxy, you need to download the following .jar files from the location <UnwiredPlatform_InstallDir>\MobileSDK\OData\Android\libraries\:
    • sup-json.jar
    • ClientLib.jar
    • SUPProxyClient*.jar
  2. Create a new folder, named libs, in your Eclipse/Android project.
  3. Right click libs and choose Import -> General -> File System, then click Next.
  4. Browse the file system to find the library's parent directory (where you downloaded it).
  5. Click OK, then click the directory name (not the checkbox) in the left pane and check the relevant JAR in the right pane. This puts the library into your project (physically).
  6. Right click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then click Add JARs...
  7. Navigate to your new JAR in the libs directory and add it. (This is when your new JAR is converted for use on Android.)
This procedure includes a Dalvik-converted JAR in your Android project and makes Java definitions available to Eclipse in order to find the third-party classes when compiling your project's source code.