I'm following the document at Google (https://developers.google.com/ar/develop/java/scene-viewer#ar-only).
I put glTF file in assets/models
directory (as same location with Andy.obj
)
and I tried to load glTF 2.0 file (from KhronosGroup Sample) but failed:
Intent sceneViewerIntent = new Intent(Intent.ACTION_VIEW);
Uri intentUri =
Uri.parse("https://arvr.google.com/scene-viewer/1.0").buildUpon()
.appendQueryParameter("file", "models/BoxTextured.glb")
.appendQueryParameter("mode", "ar_preferred")
.appendQueryParameter("title", "Untitled")
.build();
sceneViewerIntent.setData(intentUri);
sceneViewerIntent.setPackage("com.google.ar.core");
startActivity(sceneViewerIntent);
In document (which linked above), there is no clue how to write the code to load glTF from local.
what can I do for resolved this problem in android?
Thanks.
edit: The source is based on https://github.com/google-ar/arcore-android-sdk/tree/master/samples/hello_ar_java, and I worked HelloArActivity.java
, ARCore Android SDK version is 1.17.0