Using Multiple Hybrid Web Containers on the Same Android Device

It is possible to configure the Hybrid Web Container so that two or more Hybrid Web Containers can co-exist on the same device.

  1. Open the AndroidManifest.xml file, which is located under the HybridWebContainer project folder.
  2. In the manifest tag, change the "com.sybase.hwc" package attribute to something else.
  3. Search the file and change any references to "com.sybase.hwc" to the new package from step 2.
    Note: Do not change any references to com.sybase.hybridApp, as these refer to the library jar files.
  4. Save the file and choose Yes when asked if you want to change your launch configuration.
  5. Change to the Eclipse Java perspective.
  6. Right-click the package under src (it will be the old package name, com.sybase.hwc) and choose Refactor > Rename.
  7. Set the name to be the package name you set in step 2.
  8. Open the CustomizationHelper.java file, which is located in ...\HybridWebContainer\src\com\sybase\hwc, and find the method named getAppId():
    By default getAppId() returns Brand.OEM_HYBRIDAPP_APPID. Change it to return a String that uniquely identifies your application.
  9. You must now add an application with a matching App id in Sybase Control Center, and if you want to use the automatic registration option, you must also add an Application Connection Template.
    See Sybase Control Center for Sybase Unwired Platform > Administer > Applications > Application Creation > Manually Creating Applications and Sybase Control Center for Sybase Unwired Platform > Administer > Applications > Application ID Overview.
    Now when you build the Hybrid Web Container, you can install it on a device that already has a Hybrid Web Container installed (but with a different package name). You should make other changes to your new Hybrid Web Container, such as app_short_name in the strings.xml file, or the icon .png image, to differentiate the Hybrid Web Containers on the device.