Setup Activity Collection
To enable activity collection in AR experience, simply add analyticId: "<YOUR_USER_ID>"
when you init service.
With this config, the system can analyticId
to track how users interact with collection activity through an AR experience.
Android Activity
val onFinishedActivityAction: ((activity: ActivityCollection) -> Unit) = { activity ->
Log.d("onFinishedActivity", "activity id ${activity.activityCollectionId}")
}
val intent = Intent(requireContext(), ARCloudActivity::class.java)
intent.putExtra("AccessToken", "Bearer ey...")
intent.putExtra("PointCloudMode", true)
// To enable option below
intent.putExtra("ActivityCollectionMode", true)
intent.putExtra("AnalyticId", "<YOUR_USER_ID>")
intent.putExtra("OnActivityListener", OnActivityListener(onFinishedActivityAction))
...
Android Fragment
val arcloud = ARCloudFragment()
arcloud.accessToken = "Bearer ey..."
arcloud.pointCloudMode = true
// To enable option below
arcloud.activityCollectionMode = true
arcloud.analyticId = "<YOUR_USER_ID>"
...
We also have pre-build page to show activity information here is the example: