Hi,
I used this tutorial https://developer.vuforia.com/forum/faq/unity-how-can-i-extend-unitys-android-activity to start the QCarPlayer within my Android App. I search the View where the Player is in recursively and this works just fine. When I want to return, I call mQCARView.setVisibility(View.GONE); on my QCAR view which is (as far as I understood) hiding the Unity Player. But the thing is, when I call it, it doesn't only hide the player but also seems to finish my other Activity. So the setup here is as follows
Activity A -> Activity B -> QCAR Player
So far this works fine. But when I now want to hide the player and would expect to come back to Activity B, I turn out to be at Activity A. Any idea why this could happen? Am I missing something?
Thank you so much!
Start / End QCARPlayer from within Android
Have you tried with:
mQCARView.setVisibility(View.INVISIBLE);
Start / End QCARPlayer from within Android
I just tried it and got the same result. Maybe it helps to mention that my AR View is startet from an activity which consist of several Fragments. I used a Pager Adapter for it, as I needed swipable views. Any idea?
Start / End QCARPlayer from within Android
Not sure if the Fragments play a role here, but I cannot exclude it;
one thing you could try to reproduce the issue on a build a basic sample (again using the same approach explained in the article you refer below, but with a simplified UI, without Fragments and Page Adapater).
Start / End QCARPlayer from within Android
I tried what you suggested and with this time it worked perfectly with the same code. Any idea what the Problem with the Fragments could be? I am really stuck here :/
Start / End QCARPlayer from within Android
Can you explain briefly what is the structure and view hierarchy of your Fragment-based activity ? and what do you do when you start the Unity-QCAR from Activity B ?
Start / End QCARPlayer from within Android
Activity A: 6 equal fragments, addressed through a Navigation Drawer one of those Fragments contains a list, onItemClick you start Activity B
Start / End QCARPlayer from within Android
Any news on this topic?
Start / End QCARPlayer from within Android
Thanks for the details on the fragments, but I cannot see any obvious reason why it should behave in that way;
Start / End QCARPlayer from within Android
Hi,
turns out that is not a Vuforia specific problem. It was rather because I hade some things wrong with the context.