【发布时间】:2020-03-22 00:20:54
【问题描述】:
我尝试制作一个可以查看 3d 模型的 SceneView 意图。
Intent sceneViewerIntent = new Intent(Intent.ACTION_VIEW);
sceneViewerIntent.setData(Uri.parse("https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado/glTF/Avocado.gltf"));
sceneViewerIntent.setPackage("com.google.android.googlequicksearchbox");
sceneViewerIntent.putExtra("mode","3d_only");
mContext.startActivity(sceneViewerIntent);
当此意图打开时,它为用户提供了在您自己的环境中查看模型的选项,但我想将其关闭,根据https://developers.google.com/ar/develop/java/scene-viewer#3d-or-ar,您应该能够传递一个名为“模式”的参数可以具有值“3d_only”,这应该会阻止用户在 AR 中查看模型。
我试图通过sceneViewerIntent.putExtra("mode","3d_only"); 传递这个值,但它不起作用。我传递的信息是否正确?
【问题讨论】:
标签: java android-intent arcore sceneform