AnsweredAssumed Answered

message not work

Question asked by Yrii on Oct 4, 2015
Latest reply on Oct 4, 2015 by wroot

Smask 4.1.4

 

111.PNG

222.PNG

 

 

StanzaTypeFilter message_filter = new StanzaTypeFilter(Message.class);

            myListener = new StanzaListener() {

  @Override

  public void processPacket(Stanza arg0) throws NotConnectedException {

  // TODO Auto-generated method stub

  System.out.println("My log "+arg0.toXML());

  }};

  conn2.addSyncStanzaListener(myListener,message_filter);

 

My log - <message to='465935512265@gcm.googleapis.com' from='devices@gcm.googleapis.com' type='normal'><gcm xmlns='google:mobile:data'></gcm></message>

Outcomes