com.bear.common.sdk / IBearHandler

IBearHandler

interface IBearHandler

This class provides ability to handle BEAR SDK features.

Types

ScreenshotCallback

interface ScreenshotCallback

Interface for screenshot task callback.

Functions

addFlashListener

abstract fun addFlashListener(listener: FlashStatusListener): Unit

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

addScanListener

abstract fun addScanListener(listener: ScanStatusListener): Unit

Add listener for ScanStatus. removeScanListener should be called when activity/fragment is destroyed.

cancelScreenshot

abstract fun cancelScreenshot(): Unit

Cancel screenshot task if running.

cleanView

abstract fun cleanView(): Unit

Remove marker and assets from the view.

disableFlash

abstract fun disableFlash(): Unit

Disable flash.

enableFlash

abstract fun enableFlash(): Unit

Enable flash.

getScanStatus

abstract fun getScanStatus(): ScanStatus

Get current scan status.

isFlashEnabled

abstract fun isFlashEnabled(): Boolean

Get current flash status.

isScanRunning

abstract fun isScanRunning(): Boolean

Check if scan is running.

registerBearCallback

abstract fun registerBearCallback(callback: BearCallback): Unit

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

removeFlashListener

abstract fun removeFlashListener(listener: FlashStatusListener): Unit

Remove listener for FlashStatus.

removeScanListener

abstract fun removeScanListener(listener: ScanStatusListener): Unit

Remove listener for ScanStatus.

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.

triggerFocus

abstract fun triggerFocus(): Unit

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

unregisterBearCallback

abstract fun unregisterBearCallback(callback: BearCallback): Unit

Unregister callback for BEAR SDK.