Hi, I have an android vuforia application made with unity3d . this application has a menu in native java code and with a button I'm supposed to launch the unity3d scenes. however I also want to be able to click back and go back to native java activity.
for this reason I created a new class which extends QCARPlayerNativeActivity and from there I defined a function to call it from unity3d with AndroidJavaClass and AndroidJavaObject with the code below :
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
jo.Call("onBackPressed2");
basically eveything works fine and I can launch a none-vuforia unity3d scene with this method and also go back to my native activities. but as soon as I try to go to a vuforia scene , I get back to my native activity and I can't launch vuforia scenes.
I'll appreciate if moderators can help me with this. I've been struggling with this issue for more than a week and I had also posted question about this on other threads but no one answered .
Thanks very much
Well this problem occured because of my Manifest . I was trying to launch vuforia scenes from another activity which was extending QCARPlayerNativeActivity. It would work fine except when you had specified screenorientation for a scene inside unity . I just copied and pasted the properties of QCARPlayerNativeActivity in manifest to my new activity and it works fine :)