I've an Android simple browser app, consisting of a single activity
containing a XWalkView instance and a close button (which calls
Activity.finish()). The app initializes the xwalk engine using
XWalkInitializer, as described in
https://crosswalk-project.org/apis/embeddingapidocs_v7/org/xwalk/core/XWalkInitializer.html

The question is: does my activity need to call XWalkView.onDestroy(),
XWalkView.onHide()... explicitly?

According to the documentation online (e.g.
https://crosswalk-project.org/apis/embeddingapidocs_v7/org/xwalk/core/XWalkView.html#onDestroy--),
this is done automatically when the container activity goes through the
standard activity lifecycle. But when I connect to the device through ADB
and use desktop chrome for remote debugging, I can still see the webview in
chrome://inspect even after the activity has been destroyed. If I start my
activity N times, and close it every time, I'll still see N webviews in
chrome://inspect.

I've modified my app to call XWalkView.onDestroy() explicitly (in
overridden Activity.onDestroy()), and the webviews seem to be properly
destroyed (I don't see them anymore in chrome://inspect). But this
contradict the online documentation that says the XWalkView lifecycle
methods are called automatically.

Could you clarify whether embedding activities are supposed to call
XWalkView lifecycle methods explicitly?

Thanks,
Michael.
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help

Reply via email to