Using Smart Contract
// Neo Cast Comm Contract
```java
public static void sendNotification(String topicId, String name, String description, String mediaUrl,
String websiteUrl)
```INeoCastCommInterface(EPNS_COMM_CONTRACT_ADDRESS_FOR_SPECIFIC_BLOCKCHAIN).sendNotification(
YOUR_CHANNEL_ADDRESS, // The channel address; recommended to set the channel via the dApp and put its value here
to, // The recipient's address; put address(this) for broadcast or subset, for targeted notifications, put the recipient's address
bytes(
string(
// Here, you are passing the notification identity, segregator, payload type, segregator, notification title, segregator, and notification body
abi.encodePacked(
"0", // Notification identity; see documentation for details
"+", // Segregator
"3", // Payload type (1, 3, or 4 for Broadcast, targeted, or subset)
"+", // Segregator
"Title", // Notification title
"+", // Segregator
"Body" // Notification body
)
)
)
);Last updated