Package com.castlabs.sdk.viisights
Class ViisightData
java.lang.Object
com.castlabs.sdk.viisights.ViisightData
- All Implemented Interfaces:
Parcelable
ViisightData class represents the data structure for Viisight tracks, scenes, and hotspots.
It implements Parcelable to allow passing instances between Android components.
-
Nested Class Summary
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Parcelable.Creator<ViisightData> Parcelable creator for ViisightData.URL for the Viisight hotspots.URL for the thumbnails of the Viisight scenes.URL for the Viisight scenes.URL for the Viisight tracks.Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Method Summary
Modifier and TypeMethodDescriptionstatic ViisightDataCreates a ViisightData instance from a JSON string.intgetAbsoluteHotspotsUri(String manifest) Returns the absolute URI for hotspots based on the manifest URL.getAbsoluteScenesThumbsUrl(String manifest) Returns the absolute URL for scene thumbnails based on the manifest URL.getAbsoluteScenesUri(String manifest) Returns the absolute URI for scenes based on the manifest URL.getAbsoluteUri(String manifest) Returns a string representation of the ViisightData object.voidwriteToParcel(Parcel dest, int flags)
-
Field Details
-
CREATOR
Parcelable creator for ViisightData. -
url
URL for the Viisight tracks. -
hotspotsUrl
URL for the Viisight hotspots. -
scenesUrl
URL for the Viisight scenes. -
scenesThumbsUrl
URL for the thumbnails of the Viisight scenes.
-
-
Method Details
-
create
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:
describeContentsin interfaceParcelable
-
writeToParcel
- Specified by:
writeToParcelin interfaceParcelable
-
getAbsoluteUri
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
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
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
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.
-