Skip to content

storyclm/story-iot-android

Repository files navigation

Story IoT for Android

Lib for work with StoryCLM data and files

Installation

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'

Usage

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")

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published