Downgrading the PhoneGap Library Used by the Android Hybrid Web Container

Change from the Cordova 2.0 library included with the Android Hybrid Web Container to the PhoneGap 1.4.1 library.

The files referenced in this procedure are located in the Android_PhoneGap_Downgrade.zip file.

  1. Use a diff utility tool to compare the file UiHybridAppContainer_before.java and UiHybridAppContainer_after.java files.
  2. Open the UiHybridAppContainer.java file, which is located in ..HybridWebContainer\src\com\sybase\hwc, and apply the changes found with the diff utility tool.
    Note: Keep in mind that this change could remove bug fixes, or cause unexpected behavior of the related new features.
  3. Rebuild the Hybrid Web Container project to make sure there are no compilation errors.
  4. Replace the cordova-2.0.0.jar located in <SMP_HOME>\UnwiredPlatform\MobileSDK23\HybridApp\API\Container\android, with the phonegap-1.4.1.jar file, which is in the Android_PhoneGap_Downgrade.zip file.
  5. In the HybridWebContainer project, remove the res/xml/config.xml file and add the plugins.xml and phonegap.xml files.
  6. Open the UiHybridAppContainer.java file for editing and change the import statement from import org.apache.cordova.DroidGap to import com.phonegap.DroidGap.
  7. Find the method:
    @Override
      	 public void onCreate( Bundle savedInstanceState ) {      
          	super.setBooleanProperty("showTitle", true );
          	super.onCreate( savedInstanceState );
       	}

    Remove the line: super.setBooleanProperty("showTitle", true );.

  8. Rebuild the HybridWebContainer project.
  9. (Optional) Rename the phonegap-1.4.1.js file to phonegap-1.4.1.javascript.
  10. (Optional) In the Container folder of generated applications, replace the android/cordova-2.0.0.javascript with phonegap-1.4.1.javascript.
  11. (Optional) In the API.js file, remove the string android/cordova-2.0.0.javascript and replace it with android/phonegap-1.4.1.javascript.