File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
xr/src/main/java/com/example/xr/scenecore Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -51,14 +51,18 @@ private fun animateEntity(gltfEntity: GltfModelEntity) {
5151private fun ComponentActivity.startSceneViewer () {
5252 // [START androidxr_scenecore_sceneviewer]
5353 val url =
54- " https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/FlightHelmet /glTF/FlightHelmet .gltf"
54+ " https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Avocado /glTF/Avocado .gltf"
5555 val sceneViewerIntent = Intent (Intent .ACTION_VIEW )
5656 val intentUri =
5757 Uri .parse(" https://arvr.google.com/scene-viewer/1.2" )
5858 .buildUpon()
5959 .appendQueryParameter(" file" , url)
6060 .build()
61- sceneViewerIntent.setDataAndType(intentUri, " model/gltf-binary" )
62- startActivity(sceneViewerIntent)
61+ sceneViewerIntent.setData(intentUri)
62+ try {
63+ startActivity(sceneViewerIntent)
64+ } catch (e: ActivityNotFoundException ) {
65+ // There is no activity that could handle the intent.
66+ }
6367 // [END androidxr_scenecore_sceneviewer]
6468}
You can’t perform that action at this time.
0 commit comments