Recently I use qt to write a android app.
But I have a big question, can I use/call some native android APIS, such as call special activity?
e.g, In Android SDK I call contacts in java:
Intent intent = new Intent(Intent.ACTION_PICK,ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);
Is there a some c++ wrapper libraries for java android sdk APIs?
Or if I need a some special component (that has written with java), can I have it in my qt android program?
Or make a program with mixed pages/activities of "pure qt" and "standard java" or "C++ android NDK" ?
(I ask this question because I have a experience with MOSYNC framework, that was a good one but you have been limited to its own libraries, you couldn't use any external libraries or android standard APIs, ...)
Thanks in advance.
EDIT: according to improvements in JNI ( http://qt-project.org/doc/qt-5/qtandroidextras-index.html), I have a question: can I use 'any' android Java third-party libraries in my qt project? As I use those libraries in Java SDK projects?
You can program in C/C++ using the Android NDK. You'll have to wrap your c++ codebase in a static library and load that through a Java wrapper & JNI.
The standard NDK does not support RTTI and a lot of the functionality of standard c++ is also not available such as std::string, etc. To solve this you can recompile the NDK. Dmitry Moskalchuk supplies a modified version of the NDK that supports this at http://www.crystax.net/android/ndk-r3.php. This modified version works on all Android phones that run on an ARM processor.
Note:JNI calls can decrease your performance by a lot. Java isn't that hard tho -- if you know how to program in C/C++. The advantage of Java is that the application can run on any device running Android, where as NDK applications depend on the architecture it was compiled for.