2016-12-27 3 views

답변

2
public void GetServerTime(){ 
     if(xmppConnection!=null&&xmppConnection.isConnected()) 
      try { 
       EntityTimeManager timeManager = EntityTimeManager.getInstanceFor(xmppConnection); 
       String time = timeManager.getTime("SERVERDOMAIN").getUtc(); 
      Log.d("",""+time); 
      }catch (Exception e){ 
       Log.d("",""+e); 
      } 


    } 

동안 SERVERDOMAIN는 XMPP 서버 URL입니다. 사용자 JID를 추가하는 경우 (예 : [email protected])

`

chat.xxmpp.com

`SERVERDOMAIN로 사용됩니다

관련 문제