android - Pusher Java Client : Failed to subscribe to a presence channel as well as a private channel at a time -


i using pusher java client (pusher-java-client mdpye) develop android application using pusher push notification. can subscribe presence channel after connecting pusher. once subscribed presence channel, when try subscribe private channel well, showing error: invalid signature: expected hmac sha256 hex digest of xxx:yyyy, got xxxxxxxxxxxxx (possibly authentication error).

the point if there problem in authentication, not have been able connect first presence channel. so, can problem?

code snippet:

authorizer = new httpauthorizer(endpointurl); pusheroptions options = new pusheroptions().setencrypted(true).setauthorizer(authorizer); pusher = new pusher(pusher_key, options); pusher.getconnection().bind(connectionstate.all, this); string socketid = pusher.getconnection().getsocketid(); string selfjson = authorizer.authorize(presence_channel_name, socketid); presencechannel = pusher.subscribepresence(presence_channel_name, presenceeventlistener); notificationchannel = pusher.subscribeprivate(notificationchannelname, notificationeventlistener); 

channels authorised independently of each other - call made authorizer each private or presence subscription made, it's possible endpoint returns correct result 1 , incorrect other.

note there difference in response required authorisation endpoint between private , presence channels, latter includes data user not valid in former. see http://pusher.com/docs/authenticating_users#implementing_endpoints


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -