public class

VidinotiArWebView

extends WebView
java.lang.Object
   ↳ android.view.View
     ↳ android.view.ViewGroup
       ↳ android.widget.AbsoluteLayout
         ↳ android.webkit.WebView
           ↳ com.vidinoti.android.vdarsdk.arcore.VidinotiArWebView

Class Overview

Web view used for running the 3D WebGL rendering. The web view offers some methods for executing some javascript functions. The web view can load a remote URL or a URL that is relative to a folder, see loadUrl(String, String)

Summary

[Expand]
Inherited Constants
From class android.webkit.WebView
From class android.view.ViewGroup
From class android.view.View
[Expand]
Inherited Fields
From class android.view.View
Public Constructors
VidinotiArWebView(Context context)
VidinotiArWebView(Activity activity)
Public Methods
void loadUrl(String url)
void loadUrl(String url, String modelPath)
Loads the URL.
void sendAnchorMatrix(float[] anchorMatrix)
Sends the matrix corresponding to the anchor
void sendAnchorPlaced(String anchorId)
Informs the javascript that the anchor has been placed
void sendImageTrackingError(String errorMessage)
Sends an error, this should be called only when an error occurs during image tracking
void sendPlacementMatrix(VidinotiArPlacementQuality quality, float[] matrix)
Sends the placement matrix together with the placement quality
void sendProjectionMatrix(float[] projectionMatrix)
Sends the projection matrix to the javascript
void sendScreenCapture(String base64Jpeg)
Sends the camera capture
[Expand]
Inherited Methods
From class android.webkit.WebView
From class android.widget.AbsoluteLayout
From class android.view.ViewGroup
From class android.view.View
From class java.lang.Object
From interface android.graphics.drawable.Drawable.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.ViewGroup.OnHierarchyChangeListener
From interface android.view.ViewManager
From interface android.view.ViewParent
From interface android.view.ViewTreeObserver.OnGlobalFocusChangeListener
From interface android.view.accessibility.AccessibilityEventSource

Public Constructors

public VidinotiArWebView (Context context)

public VidinotiArWebView (Activity activity)

Public Methods

public void loadUrl (String url)

Since: API Level

public void loadUrl (String url, String modelPath)

Loads the URL. The URL can be a remote URL (must start with http/https) or a local URL which is relative to the given path (e.g. my-ar.html)

Parameters
url the URL
modelPath the path where the local files are stored (can be null)

public void sendAnchorMatrix (float[] anchorMatrix)

Sends the matrix corresponding to the anchor

Parameters
anchorMatrix the transform matrix

public void sendAnchorPlaced (String anchorId)

Informs the javascript that the anchor has been placed

Parameters
anchorId the ID of the anchor

public void sendImageTrackingError (String errorMessage)

Sends an error, this should be called only when an error occurs during image tracking

Parameters
errorMessage the error

public void sendPlacementMatrix (VidinotiArPlacementQuality quality, float[] matrix)

Sends the placement matrix together with the placement quality

Parameters
quality the placement quality (aka. confidence)
matrix the pose matrix (may be null if the placement failed)

public void sendProjectionMatrix (float[] projectionMatrix)

Sends the projection matrix to the javascript

Parameters
projectionMatrix the projection matrix

public void sendScreenCapture (String base64Jpeg)

Sends the camera capture

Parameters
base64Jpeg the image in JPG format and encoded to base 64