Sorena H A
Sorena H A

Reputation: 35

show VR tour in android

I want to show VR tour like this http://alfavr.ir/alfavr.ir/to/park.html in my Android app. how can I do that? I tried to display with web view because the file format is Html but did not work.

Upvotes: 0

Views: 98

Answers (2)

Sorena H A
Sorena H A

Reputation: 35

Adding this line make It work.

  webView.getSettings().setJavaScriptEnabled(true);

Upvotes: 0

Juan Diego Lozano
Juan Diego Lozano

Reputation: 1009

You can try with VRPanormaView which is included in the Google VR SDK. This is an example from https://developers.google.com/vr/develop/android/vrview:

<com.google.vr.sdk.widgets.pano.VrPanoramaView
    android:id="@+id/pano_view"
    android:layout_margin="5dip"
    android:layout_width="match_parent"
    android:scrollbars="@null"
    android:layout_height="250dip" />

Inside the Activity, the primary method is VrPanoramaView.loadImageFromBitmap(). Call it with a standard Android Bitmap object and an optional VrPanoramaView.Options object. The latter is used to configure the format of the image. The Activity also implements a VrPanoramaEventListener which receives events when the load operation succeeds or fails.

Upvotes: 1

Related Questions