Lib for work with StoryCLM data and files
Use Gradle dependency for import lib from JitPack
Project build.gradle file
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
...
}
}
App build.gradle file
implementation 'com.github.storyclm:story-iot-android:1.0.2'
Initialization
import ru.breffi.lib.StoryIoTHttpConnector
StoryIoTHttpConnector.Builder(this)
.setAppName(getString(R.string.app_name))
.setAppVersion(BuildConfig.VERSION_NAME)
.build()
Publish small message
storyIoTHttpConnector.publishSmallMessage(storyMessage)
Publish large message with file or any other large data
storyMessage.body = file
storyIoTHttpConnector.publishLargeMessage(storyMessage)
Get messages feed
storyIoTHttpConnector.getFeed("CorrelationToken", StoryParams.DIRECTION_FORWARD, 10)
Get message by id
storyIoTHttpConnector.getMessage("id")
Create or update message metadata
storyIoTHttpConnector.updateMetadataMessage("metaDataName", "metaDataValue", "messageId")
Delete message metadata
storyIoTHttpConnector.deleteMetadataMessage("metaDataName", "messageId")