Skip to content

v3.6.0

Compare
Choose a tag to compare
@viperwarp viperwarp released this 03 Nov 04:06

Clear Device Data

new clearDevice() method for clearing device messages, attributes, and events accociated with that device.

//Carnival.ATTRIBUTES|Carnival.MESSAGE_STREAM|Carnival.EVENTS
Carnival.clearDevice(Carnival.CLEAR_ALL, new Carnival.CarnivalHandler<Void>() {
    @Override
    public void onSuccess(Void value) {

    }

    @Override
    public void onFailure(Error error) {

    }
});

Get Message

New method to get a Message by its ID.

String messageId = getIntent().getStringExtra(Carnival.EXTRA_MESSAGE_ID);

Carnival.getMessage(messageId, new Carnival.CarnivalHandler<Message>() {
    @Override
    public void onSuccess(Message message) {
        formatView(message);
    }

    @Override
    public void onFailure(Error error) {
        Log.e(TAG, "Failed to load message: " + error);
    }
});

Notifications

Optimised notification handing resulting in less network overhead.