Exception when opening sceneview fragment, after the activity is already running and has shown other things #7
-
Intitial Question: So I have been in the process of transitioning my AR Project from sceneform to sceneview and I ran into an error. Since I am not sure if that is not yet supported or me doing something wrong, I figured I'd ask here first. So my app has one MainActivity and a few fragments, but when I start my app it doesn't go straight to AR, but it starts a normal screen first, from where I navigate to the ArFragment later. When I now am trying to run my app with code similar to your samples, I am getting the error that Camera permission result must be registered before Activity resume So now I am wondering, with sceneview automatically handling those permissions, is it implemented that the ArFragment needs to be displayed as the first fragment in the app, or am I missing something? This is the stacktrace: https://pastebin.com/FsMHgBpZ |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 5 replies
-
Yes I did get rid of all of the ArFragment code and yes I am navigating to the Fragment that has the SceneView, after the mainactivity is already running and doing other things. Is that not intended to be possible and do I need to create another Activity for my AR stuff? |
Beta Was this translation helpful? Give feedback.
-
This message should appear only if you add the |
Beta Was this translation helpful? Give feedback.
-
@ThomasGorisse I made a small sample project, that has 2 fragments and navigates between the 2 like I do and has the same exception: |
Beta Was this translation helpful? Give feedback.
-
I'm totally sorry about that but I made a big mistake on the permission activity result registering at the ArSceneView init without checking for already registered activity. We are near from releasing the 0.1.0 with awesome new features and the only missing part wich taht missing for this version is now available: https://github.com/romainguy/kotlin-math/releases/tag/v1.2.0 So, if you can wait a little we will fix your issue on that release. |
Beta Was this translation helpful? Give feedback.
-
Fixed |
Beta Was this translation helpful? Give feedback.
Fixed
db586eb - New CameraPermission and ARCore install/update system. Called automatically and handles creation success or possible fallback like 3D only usage: