Initiating Images and 360 Shoot

About Shoot Builder

Shoot builder is an object where all the configuration settings are set up for Spyne Android SDK. Shoot builder expects basic parameters and allows you to use advanced functionalities as well.

Create a shoot builder function

Shoot builder function expects 4 values,

  1. context is the current activity context
  2. userId is a string value and needs to be an Email ID.
  3. skuListener is the callback interface which you have to implement in your activity/fragment and over-ride the given methods,
    • onSkuCreated: This callback is returned on project creation & returns SpyneSKUId. SpyneSKUId will be useful on fetching processed images using our Public API.
    • onShootCompleted: This callback is returned on project completion. Please note, in case of reshoot, this callback is returned will extra parameter isReshoot. This parameter will be true in cases where reshoot has taken place.
  4. Angle is the integer value and denotes the count of exterior angles to be shot by the user.
skuListener methods
fun onSkuCreated (skuId: String)
fun onShootCompleted(skuId: String, isReshoot: Boolean)

Shoot Builder Object
var builder = Spyne.ShootBuilder(
context: this,
userId: "myUniqueEmailId"
skuListener: this,
angle: 8
)

Add ShootID configuration to Shoot Builder

ShootID expects a string value and is a mandatory key which will be mapped to the unique Spyne SKU Id.
Do note, ShootID does not allow blank values and special characters.

builder.uniqueShootId(uniqueShootId: "myUniqueShootId")

Specifying Shoot type

Spyne SDK allows user to Shoot through guided flow as well as Upload images. Before initiating the SDK shoot, shoot type expects a specific value.

Shoot will initiate the Spyne guided Shoot flow

builder.ShootType(ShootType.SHOOT)

Initiating the image shoot flow

val spyne = builder.build()
spyne.start()

Initiating the 360 shoot flow

val spyne = builder.build()
spyne.spyne.startVideoThreeSixty()

Setting up advanced configurations in Shoot Builder

Spyne SDK allows you to add advanced features as per your requirement. You can append these advance features in the Shoot Builder function before starting it, as shown below. To know more about the Advanced SDK configurations, please click here.

builder.uniqueShootId("myUniqueShootId").shootLocation(false)