Class ViisightData

java.lang.Object
com.castlabs.sdk.viisights.ViisightData
All Implemented Interfaces:
Parcelable

public class ViisightData extends Object implements Parcelable
ViisightData class represents the data structure for Viisight tracks, scenes, and hotspots. It implements Parcelable to allow passing instances between Android components.
  • Field Details

    • CREATOR

      public static final Parcelable.Creator<ViisightData> CREATOR
      Parcelable creator for ViisightData.
    • url

      public String url
      URL for the Viisight tracks.
    • hotspotsUrl

      public String hotspotsUrl
      URL for the Viisight hotspots.
    • scenesUrl

      public String scenesUrl
      URL for the Viisight scenes.
    • scenesThumbsUrl

      public String scenesThumbsUrl
      URL for the thumbnails of the Viisight scenes.
  • Method Details

    • create

      public static ViisightData create(@NonNull String json)
      Creates a ViisightData instance from a JSON string.
      Parameters:
      json - The JSON string containing the Viisight data.
      Returns:
      A ViisightData instance or null if parsing fails.
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface Parcelable
    • writeToParcel

      public void writeToParcel(Parcel dest, int flags)
      Specified by:
      writeToParcel in interface Parcelable
    • getAbsoluteUri

      public Uri getAbsoluteUri(String manifest)
      Returns a string representation of the ViisightData object.
      Parameters:
      manifest - The manifest URL to resolve relative paths.
      Returns:
      A string containing the URLs for tracks, hotspots, and scenes.
    • getAbsoluteHotspotsUri

      public Uri getAbsoluteHotspotsUri(String manifest)
      Returns the absolute URI for hotspots based on the manifest URL.
      Parameters:
      manifest - The manifest URL to resolve relative paths.
      Returns:
      An absolute URI for hotspots or null if hotspotsUrl is not set.
    • getAbsoluteScenesUri

      public Uri getAbsoluteScenesUri(String manifest)
      Returns the absolute URI for scenes based on the manifest URL.
      Parameters:
      manifest - The manifest URL to resolve relative paths.
      Returns:
      An absolute URI for scenes or null if scenesUrl is not set.
    • getAbsoluteScenesThumbsUrl

      public String getAbsoluteScenesThumbsUrl(String manifest)
      Returns the absolute URL for scene thumbnails based on the manifest URL.
      Parameters:
      manifest - The manifest URL to resolve relative paths.
      Returns:
      An absolute URL for scene thumbnails or null if scenesThumbsUrl is not set.