Reputation: 31
I am new on using the pusher service.
At the moment i am not finding any documentation on how to trigger an event from the android application.
Of course I can subscribe to the events being pushed by the server but i don't know how to perform a POST request from android to pusher application website.
It seems that all the libraries available do not target android framework.
Thank you
Upvotes: 0
Views: 1751
Reputation: 36539
Events are triggered using the .trigger
method; for example:
channel.trigger("client-myEvent", "{\"myName\":\"Bob\"}");
See the documentation on triggering events from pusher-websocket-java
.
This feature, where clients trigger events directly, is called "client events". You could also have your clients trigger events indirectly, with a post to your server, followed by your server publishing a message.
Upvotes: 1