com.bear.common.sdk.ui.activities.main / ArActivity

ArActivity

abstract class ArActivity : AppCompatActivity, IArActivity

This activity provides augmented reality view. Implements IArActivity.

Constructors

<init>

ArActivity()

This activity provides augmented reality view. Implements IArActivity.

Properties

bearHandler

val bearHandler: IBearHandler

The IBearHandler.

scanLineColor

open val scanLineColor: Int

The scan line color. White if not set.

scanTimeout

open val scanTimeout: Int

The scan timeout duration in seconds. Disabled if not set or set to 0.

Functions

onCreate

open fun onCreate(savedInstanceState: Bundle?): Unit

Called when the activity is starting. Initialize augmented reality view.

onDestroy

open fun onDestroy(): Unit

Perform any final cleanup before activity is destroyed.

onPause

open fun onPause(): Unit

This callback will stop scan if running.

onStart

open fun onStart(): Unit

This callback will trigger ArActivity.resumeArView.

onStop

open fun onStop(): Unit

This callback will trigger ArActivity.pauseArView.

openPlayer

fun openPlayer(assetId: Int, timeStamp: Long): Unit

Called when video or audio asset is clicked. Opens video or audio player depending on asset type.

pauseArView

fun pauseArView(): Unit

Pause augmented reality view. This method can be called from a fragment. Warning: screen will become black because it will deinit camera.

resumeArView

fun resumeArView(): Unit

Resume augmented reality view. This method can be called from a fragment.

showArSceneWithoutTracking

fun showArSceneWithoutTracking(markerId: Int): Unit

Display marker without tracking. This method can be called from a fragment.

Inherited Functions

inflateContentView

abstract fun inflateContentView(): Unit

This method will be called on BearCallback.onArViewInitialized. Make sure to inflate your view and add it by calling android.support.v7.app.AppCompatActivity.addContentView.

openWebView

abstract fun openWebView(url: String): Unit

Called when webview asset is clicked.