Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public Object pushWorkFlowDirectToDroidClient(final Map<String, Object> notifParams) {
- if (notifParams != null && !notifParams.isEmpty()) {
- final String targetServiceMethod =
- extractMethodToCallFromObject(notifParams);
- final RTMPClient client = new RTMPClient();
- client.connect("localhost", 1935, targetServiceMethod,
- new IPendingServiceCallback() {
- @Override
- public void resultReceived(IPendingServiceCall call) {
- Object payloadObj = null;
- System.err.println("Connected: " + call.getResult());
- if (notifParams.containsKey(MESSAGE_PAYLOAD_KEY)) {
- payloadObj = notifParams.get(MESSAGE_PAYLOAD_KEY);
- }
- if (payloadObj == null) {
- payloadObj = notifParams;
- }
- if(payloadObj==null){
- payloadObj = notifParams;
- }
- if (payloadObj != null) {
- client.invoke(targetServiceMethod,
- new Object[]{payloadObj},
- new IPendingServiceCallback() {
- @Override
- public void resultReceived(
- IPendingServiceCall call) {
- System.err.println("Received: "
- + call.getResult());
- }
- });
- }else{
- }
- }
- });
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement