The com.bear.common.sdk.BearCallback provides 4 different callbacks for BEAR SDK:
- onMarkerRecognized(int markerId, List: the marker is recognized and will be displayed in the augmented reality view. In this callback you can handle to display additional layout on the view or call a fragment.
- onMarkerNotRecognized(): no marker found (depends on scan timeout configured). If called, beware of light conditions, network connection and correct license keys, else there is no marker in the scanned place.
- onAssetClicked(int assetId): user clicked on an asset
- onError(Throwable error, boolean isMarkerFromScan): error while retrieving marker from backend.
isMarkerFromScan
will be true if marker was recognized while scanning and false when marker is build from ArActivity.showArSceneWithoutTracking(int markerId).
The BearCallback can be registered from ArActivity using BearHandler.registerBearCallback method. See example.
Comments
Please sign in to leave a comment.