@ SuppressWarnings ( "unchecked" ) public void handleLoginResult ( Map < String , Object > jsonFields ) { if ( jsonFields . containsKey ( "result" ) ) { Map < String , Object > result = ( Map < String , Object > ) jsonFields . get ( DdpMessageField . RESULT ) ; mResumeToken = ( String ) result . get ( "token" ) ; saveResumeToken ( mResumeToken ) ; mUserId = ( String ) result . get ( "id" ) ; mDDPState = DDPSTATE . LoggedIn ; broadcastConnectionState ( mDDPState ) ; } else if ( jsonFields . containsKey ( "error" ) ) { Map < String , Object > error = ( Map < String , Object > ) jsonFields . get ( DdpMessageField . ERROR ) ; broadcastDDPError ( ( String ) error . get ( "message" ) ) ; } }
Handles callback from login command