com.bear.common.sdk / IBearHandler

IBearHandler

interface IBearHandler : IArStateObserver, IFlashStatusHandler

This class provides ability to handle BEAR SDK features.

Types

ScreenshotCallback

interface ScreenshotCallback

Interface for screenshot task callback.

Inherited Properties

arStateObservingSubject

abstract val arStateObservingSubject: PublishSubject<ArStateChangeRegistrar>

RxJava2 PublishSubject, subscribing to which you will get ArState changes events, as alternative to callbacks. It is safer to use CompositeDisposable for this.

flashStatusObservingSubject

abstract val flashStatusObservingSubject: PublishSubject<FlashStatus>

RxJava2 PublishSubject, subscribing to which you will get FlashStatus changes events, as alternative to callbacks. It is safer to use CompositeDisposable for this.

Functions

cancelScreenshot

abstract fun cancelScreenshot(): Unit

Cancel screenshot task if running.

cleanArView

abstract fun cleanArView(): Unit

Remove marker and assets from the view.

registerBearCallback

abstract fun registerBearCallback(callback: BearCallback): Boolean

Register callback for BEAR SDK. unregisterBearCallback should be called when activity/fragment is destroyed.

startScan

abstract fun startScan(): Unit

Start scan.

stopScan

abstract fun stopScan(): Unit

Stop scan.

takeScreenshot

abstract fun takeScreenshot(callback: IBearHandler.ScreenshotCallback): Unit

Take a screenshot of the augmented reality view. This will initiate the creation of screenshot. cancelScreenshot should be called when activity/fragment is paused. Result can be handled in the ScreenshotCallback.onComplete.

triggerCameraFocus

abstract fun triggerCameraFocus(): Unit

Trigger camera focus and switch to continuous focus after 3 seconds delay.

unregisterBearCallback

abstract fun unregisterBearCallback(callback: BearCallback): Boolean

Unregister callback for BEAR SDK.

Inherited Functions

addArStateListener

abstract fun addArStateListener(listener: IArStateListener): Boolean

Add listener for ArState. removeArStateListener should be called when activity/fragment is destroyed.

addFlashListener

abstract fun addFlashListener(listener: FlashStatusListener): Boolean

Add listener for FlashStatus. removeFlashListener should be called when activity/fragment is destroyed.

disableFlash

abstract fun disableFlash(): Unit

Disable flash.

enableFlash

abstract fun enableFlash(): Unit

Enable flash.

getCurrentArState

abstract fun getCurrentArState(): ArState

Get current AR state.

isFlashEnabled

abstract fun isFlashEnabled(): Boolean

Get current flash status.

removeArStateListener

abstract fun removeArStateListener(listener: IArStateListener): Boolean

Remove listener for ArState.

removeFlashListener

abstract fun removeFlashListener(listener: FlashStatusListener): Boolean

Remove listener for FlashStatus.