Pusher on Android
I am trying to get Pusher to work on Android. Here are my needs.
- It is necessary to support "private" channels
- Secure connections must be maintained
- Should be able to override the / auth push endpoint.
Note. I have already tried the following routes ...
- Loading pusher.js into WebView and returning it back to SockJS
- https://github.com/pusher/pusher-phonegap-android (doesn't seem to support secure connections)
- https://github.com/EmoryM/Android_Pusher/blob/master/src/com/emorym/android_pusher (Requires the private key to be pushed to the client and also not updated)
- https://github.com/jmschultz/JavaPusherClient (does not support private channels)
Anyone else lucky?
+3
source to share
1 answer
Pusher has a Java library: https://github.com/pusher/pusher-java-client
Here's a very simple example app: https://github.com/pusher/pusher-android-example
You can tell the instance to Pusher
use an encrypted connection through PusherOptions
. See:
https://github.com/pusher/pusher-java-client/blob/master/src/main/java/com/pusher/client/PusherOptions.java#L24
I think this will probably be updated by default, or at least re-connection will try SSL if an unencrypted connection fails.
+5
source to share