On 5 mai, 02:02, spemin <
harry...@gmail.com> wrote:
> I'm trying to do some testing with android life cycle. Android has 6
> Activity life cycle events: onCreate, onDestroy, onStart, onStop,
> onResume and onPause. Those events are implemented in QtActivity.java;
> it then forwards to QtActivityDelegate.java through
> QtApplication.invokeDelegate() call. In libandroid-<n>.so plugin, it
> registered all of 19 native methods that could potentially be used by
> QtNative. But QtActivityDelegate.java never forwards some of the calls
> there. For example, QtNative never defines onPause() method, as the
> result of that QtApplication.invokeDelegate(null) call can never
> forward this call there, the native method pauseQtApp() will never be
> called.
>
Qt has no corresponding APIs for all Android activity life cycle
events,
so we can't forward them.
> Only one event onResume makes use of native call updateWindow; the
> rest of native methods like pauseQtApp, resumeQtApp, terminateQt never
> get calls. Is this the result of incomplete feature implementation? If
> I did not read the code correct, then how do those native methods get
> called? How do Qt/qml modules respond to those android Activity life
> cycle events? It looks to me that it doesn't respond at all.
>
We don't need them anymore, because now we prevent the activity to be
destroyed/created.
> I would appreciate more input into this issue.
BogDan.