Android Question push implementation with piesocket

kkkpe

Active Member
Licensed User
Longtime User
From the documentation https://www.piesocket.com/docs/3.0/android-websocket I should implement the following lines:

implementation 'com.piesocket:channels-sdk:1.0.5'

<uses-permission android:name="android.permission.INTERNET" />

android:usesCleartextTraffic="true"

PieSocketOptions options = new PieSocketOptions();
options.setClusterId("demo");
options.setApiKey("VCXCEuvhGcBDP7XhiJJUDvR1e1D3eiVjgZ9VRiaV");

PieSocket piesocket = new PieSocket(options);

Channel channel = piesocket.join("chat-room");

channel.listen("new-message", new PieSocketEventListener() {
@override
public void handleEvent(PieSocketEvent event) {
Log.d("PIESOCKET-SDK", "New message received: "+ event.getData());
}
});


How can I do? Thank you
 

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
It looks like you will need to write a wrapper for this to use in B4A.

If you know java, then there are guides on the forum which explain how to write a library.

If not, then you could put a request out on the business forum to pay someone else to wrap it for you.
 
Upvote 0
Top