Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

Class SdlFile

Hierarchy

java.lang.Object

Package
com.smartdevicelink.managers.file.filetypes
All Known Subclasses
com.smartdevicelink.managers.file.filetypes.SdlArtwork

Overview

A class representing data to be uploaded to core

Constructors

SdlFile()

Creates a new instance of SdlFile

public SdlFile()

SdlFile( String fileName, FileType fileType, int id, boolean persistentFile )

Creates a new instance of SdlFile

public SdlFile(String fileName,FileType fileType,int id,boolean persistentFile)

Parameters

fileName
a String value representing the name that will be used to store the file in the head unit
fileType
a FileType enum value representing the type of the file
id
an int value representing the android resource id of the file
persistentFile
a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

SdlFile( String fileName, FileType fileType, Uri uri, boolean persistentFile )

Creates a new instance of SdlFile

public SdlFile(String fileName,FileType fileType,Uri uri,boolean persistentFile)

Parameters

fileName
a String value representing the name that will be used to store the file in the head unit
fileType
a FileType enum value representing the type of the file
uri
a URI value representing a file's location. Currently, it only supports local files
persistentFile
a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

SdlFile( String fileName, FileType fileType, byte[] data, boolean persistentFile )

Creates a new instance of SdlFile

public SdlFile(String fileName,FileType fileType,byte[] data,boolean persistentFile)

Parameters

fileName
a String value representing the name that will be used to store the file in the head unit
fileType
a FileType enum value representing the type of the file
data
a byte array representing the data of the file
persistentFile
a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

SdlFile( StaticIconName staticIconName )

Creates a new instance of SdlFile

public SdlFile(StaticIconName staticIconName)

Parameters

staticIconName
a StaticIconName enum value representing the name of a static file that comes pre-shipped with the head unit

Methods

setName( String fileName )

Sets the name of the file

public void setName(String fileName)

Parameters

fileName
a String value representing the name that will be used to store the file in the head unit

getName()

Gets the name of the file

public java.lang.String getName()

setResourceId( int id )

Sets the resource ID of the file

public void setResourceId(int id)

Parameters

id
an int value representing the android resource id of the file

getResourceId()

Gets the resource id of the file

public int getResourceId()

setUri( Uri uri )

Sets the uri of the file

public void setUri(Uri uri)

Parameters

uri
a URI value representing a file's location. Currently, it only supports local files

getUri()

Gets the uri of the file

public android.net.Uri getUri()

setFileData( byte[] data )

Sets the byte array that represents the content of the file

public void setFileData(byte[] data)

Parameters

data
a byte array representing the data of the file

getFileData()

Gets the byte array that represents the content of the file

public byte getFileData()

setType( FileType fileType )

Sets the type of the file

public void setType(FileType fileType)

Parameters

fileType
a FileType enum value representing the type of the file

getType()

Gets the type of the file

public com.smartdevicelink.proxy.rpc.enums.FileType getType()

setPersistent( boolean persistentFile )

Sets whether the file should persist between sessions / ignition cycles

public void setPersistent(boolean persistentFile)

Parameters

persistentFile
a boolean value that indicates if the file is meant to persist between sessions / ignition cycles

isPersistent()

Gets whether the file should persist between sessions / ignition cycles

public boolean isPersistent()

setStaticIcon( boolean staticIcon )

Sets the the name of the static file. Static files comes pre-shipped with the head unit

public void setStaticIcon(boolean staticIcon)

Parameters

staticIcon
a StaticIconName enum value representing the name of a static file that comes pre-shipped with the head unit

isStaticIcon()

Gets the the name of the static file. Static files comes pre-shipped with the head unit

public boolean isStaticIcon()

Inherited Methods

From Class Methods
java.lang.Object getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize
View on GitHub.com
Previous Section Next Section