Skip to content

stevesoltys/remote-messages

Repository files navigation

Remote Messages

Build Status

A Remote Messages client library.

This allows for sending and receiving iMessages programmatically with an iOS device that has Remote Messages installed.

Installation

repositories {
    jcenter()
    maven { url 'https://jitpack.io' }
}

dependencies {
    compile 'com.github.stevesoltys:remote-messages:0.1.5'
}

Usage

Create a RemoteMessagesClient instance with the base URL, optional credentials, and make a query.

Here's an example:

RemoteMessagesClient client = RemoteMessagesClient.builder()
    .baseUrl("http://192.168.1.5:333")
    .username("admin").password("password")
    .build();

List<Conversation> conversations = client.getConversations();
Conversation conversation = conversations.get(0);

ConversationMessages messages = client.getMessages(conversation.getId());
messages.getMessages().forEach(System.out::println);

client.sendMessage(OutgoingMessage.builder()
    .conversationId(conversation.getId())
    .message("Hello!")
    .build());

Notes

Please note that this has only been tested on the legacy version of Remote Messages (v2). Testing for other versions would be appreciated.

License

This application is available as open source under the terms of the MIT License.

About

A Remote Messages client library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages