The com.bear.common.sdk.BearCallback provides 4 different callbacks for BEAR SDK:
- onMarkerRecognized(int markerId, List
assetIds): 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.
isMarkerFromScanwill be true if marker was recognized while scanning and false when marker is build from ArActivity.showArSceneWithoutTracking(int markerId).