Skip to content

Class ResourceManager

Il Kadyrov edited this page Oct 13, 2020 · 1 revision

ResourceManager class is used for working with images, user files and events.

Referenced from: NavigineSdk.

Public methods

Function loadImage

public void loadImage(String imageId, ResourceListener resourceListener)

Function is used for loading image from storage using its id and resource listener callback, where you will get loaded image.

Parameters

Function publishUserEvent

public String publishUserEvent(String userEvent)

Function is used for uploading user message to the server and returns randomly generated tag using which you can find your uploaded message.

Parameters
  • userEvent — users' message which will be uploaded to the server.
Return value

Returns randomly generated tag associated with your message and using which you can find your message on server.

Function uploadUserFile

public void uploadUserFile(String path, ResourceUploadListener resourceUploadListener)

Function is used for uploading user file to the server and will notify in listener about upload status. Size of file should be less than 10 MB.

Parameters
  • path — path to the user file on your system.
  • resourceUploadListenerResourceUploadListener class element.

Function getLogsList

public ArrayList<String> getLogsList()

Function is used for getting the names of log files recorded using NavigationManager.

Return value

Returns the list of log files names.

Function removeLogFile

public void removeLogFile(String name)

Function is used for removing the log by name.

Parameters
  • name — name of the log file.

Function uploadLogFile

public void uploadLogFile(String name, ResourceUploadListener resourceUploadListener)

Function is used for uploading log file to the server and will notify about loading status using the provided listener.

Parameters
Clone this wiki locally