Allow user Java/C++ interaction

Review Request #104450 - Created March 31, 2012 and submitted

Information
Tyler Mandry
android-qt
alpha4
Reviewers
necessitas
vatra
Allows interaction between user Java and user C/C++ (JNI) code, by loading the user's code in the main class loader.
SF.net bug: 140

Details
-------
This removes everything in src/android/cpp. qtmain_android.cpp is no more and is now integrated into src/plugins/platforms/android/src/androidjnimain.cpp. It seemed fitting to integrate startQtApp() into the same file as pauseQtApp() and resumeQtApp(). (Additionally this removes redundant copied code, and simplifies how necessitas projects work and are built.)

Compatibility
-------------
New library should be fully compatible with apps *already built* with old versions (before this change.) To build against the new library, existing projects simply need to update their QtActivity.java file.

Other
-----
This doesn't support using JNI with bundled libs. We have to be careful to load certain bundled libs (maybe only the plugin .so) in the delegate class loader, so I could break certain apps by making such a switch. Need a way to categorize the type of bundled lib, in order to decide which class loader to use.
Tested on a Galaxy Nexus and a Nexus One.
New libraries run both old and new apps.
New libraries support JNI interaction.

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Tyler Mandry
BogDan Vatra
BogDan Vatra
BogDan Vatra
BogDan Vatra
Tyler Mandry
Review request changed

Status: Closed (submitted)

Loading...