Skip to content

Commit

Permalink
doc: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Christophe Carvalho Vilas-Boas committed Apr 4, 2021
1 parent b75a9d1 commit bfa8bb7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Once you have cloned this project, you can run the `gradlew javaDoc` and browse

## Releases

Latest version is 5.0.0
Latest version is 6.0.0

Go to [releases](https://github.com/ChristopheCVB/TouchPortalPluginSDK/releases)

Expand Down Expand Up @@ -52,7 +52,7 @@ public class MyTouchPortalPlugin extends TouchPortalPlugin {
}

@Override
public void onDisconnect(Exception exception) {
public void onDisconnected(Exception exception) {
// Socket connection is lost or plugin has received close message
if (exception != null) {
exception.printStackTrace();
Expand All @@ -61,7 +61,7 @@ public class MyTouchPortalPlugin extends TouchPortalPlugin {
}

@Override
public void onReceive(JsonObject jsonMessage) {
public void onReceived(JsonObject jsonMessage) {
// Check if ReceiveMessage is an Action
if (ReceivedMessageHelper.isTypeAction(jsonMessage)) {
// Get the Action ID
Expand All @@ -77,6 +77,7 @@ public class MyTouchPortalPlugin extends TouchPortalPlugin {
// dummyWithData and dummySwitchAction are automatically called by the SDK
}

//...
}
```
- Edit the properties `mainClassPackage` and `mainClassSimpleName` in your `build.gradle`
Expand All @@ -100,6 +101,7 @@ public class MyTouchPortalPlugin extends TouchPortalPlugin {
private void dummyWithData(@Data String text) {
LOGGER.log(Level.Info, "Action dummyWithData received: " + text);
}

private enum Categories {
/**
* Category definition example
Expand All @@ -108,6 +110,7 @@ public class MyTouchPortalPlugin extends TouchPortalPlugin {
BaseCategory
}

//...
}
```
- Add the Plugin icon into the following directory `src/main/resources/` of your module
Expand Down

0 comments on commit bfa8bb7

Please sign in to comment.