"E/imageLoaded(12439): Activity is already finishing -> do not fire 'imageInterface.finishedLoadingImage()'"
The "errorLoadingImage()" callback of the AR.ImageResource is not called.
Does anyone know what can cause the images to become invisible?
I use a licensed version of Wikitude 1.0.5. The problem happens on HTC Desire S with Android 2.3.5, HTC Desire with Android 2.2 and Sony Xperia with Android 2.3.7.
I guess the issue is related to the fast life-cycle status changes that may apply in TabActivities.
Please let me know if that helped. Sorry for inconveniences,
Kind regards, Andreas
almost 6 years ago
Thanks for your answer. I implemented the deprecated TabActivity as a FragmentActivity and the tab containing the ArchitectView as a Fragment now. When I go to this tab the first time everything works fine, but when I switch to another tab and go back to the tab containing the ArchitectView the location of the ArchitectView remains black (this is unlike the behavior in other tabs containing other kind of views). I think that this problem has something to do with the "rewiring" of the lifecycle callback methods.
When the ArchitectView was on an Activity the onCreate()/onDestroy()/onPause()/onPostCreate()/onResume() callback methods of the Activity could be rewired to their ArchitectView equivalents. But the lifecycle of a Fragment is somewhat different from the lifecycle of an Activity.
Currently I have the onPause(), onResume() and onDestroy() callbacks of the Fragment rewired to their ArchitectView equivalents. Both the architectView.onCreate() and architectView.onPostCreate() are called from the fragments OnActivityCreated() (the architectView.onCreate() callback can not be called from the fragments onCreate() callback because the content view is not yet available at that time, and Fragments don't have a onPostCreate() callback).
Is this the correct thing to do?
almost 6 years ago
Basically your approach on integrating the ArchitectView lifecycle methods into the fragment seems fine. Actually we use a quite similar approach in our applications and it works fine. What you could try is to put the loading methods of your app into the onResume() method of the fragment and the Architect's onDestroy() method into the onPause() method of the fragment. In that way the architectworld is unloaded in onPause() and reloaded in onResume(). Keep in mind that with this approach the state of your Architect world is not maintained..
We made some changes to the internal handling of the lifecycle methods for our newly released ARchitect 1.1 SDK so if that doesn't help you could try it as well with our new version.