In fact, I didn't realized that I have used private reply, it is my fault. Thank you for the reply and now I know that there is at least one way to achieve my goal: just make a copy of $QT/src/android/java/src/org/qtproject/qt5/android/binding/QtActivity.java to my project's own android source folder, modify this file and use ANDROID_PACKAGE_SOURCE_DIR in *.pro to point to my own android source folder, then upon deployment Qt will use the modified version of QtActivity.java. But his method has a drawback: once I have upgraded Qt version, I have to re-generate my own QtActivity.java based on the current version shipped by Qt. But right now this is the only way I found to solve my problem.
---------- Forwarded message ---------- From: Alejandro Exojo <s...@badopi.org> Date: Sun, Nov 23, 2014 at 2:59 AM Subject: Re: [Interest] [qt-android] How can I customize onResume()/onPause() method of main activity To: Liang Jian <jianlian...@gmail.com> El Saturday 22 November 2014, escribió: > I don't want to call method of Activity, but want to execute some codes > in QtActivity.onResume()/QtActivity.onPause(). In a word, I want to > override these methods. FYI, you replyed privately instead of to the list. Maybe some people skip the message because thy think my answer is enough. I just want to add that I can't reproduce your setup, but I think there has to be a way. From this post: http://blog.qt.digia.com/blog/2013/07/23/anatomy-of-a-qt-5-for-android- application/ I *think* there has to be a way to add, override or decorate onResume or onPause. -- Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2 http://barnacity.net/ | http://disperso.net
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest