2016-12-27 5 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

として使用されます
関連する問題