Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
同期の進行状況の情報を受け取ります。
public interface SyncObserver
継承されたメンバーを含む SyncObserver インターフェイスのすべてのメンバー。
syncProgress メソッド
同期の進行状況レポートを受け取るには、同期を実行する新しいクラスを作成し、SyncParms.setSyncObserver メソッドを使用して実装します。
次に、SyncObserver オブジェクトの簡単な実装例を示します。
class MyObserver implements SyncObserver { public boolean syncProgress(int state, SyncResult result) { System.out.println( "sync progress state = " + state + " bytes sent = " + result.getSentByteCount() + " bytes received = " + result.getReceivedByteCount() ); return false; // Always continue synchronization. } public MyObserver() {} // The default constructor. }
上記のクラスは、次のメソッドの呼び出しによって有効にできます。
SyncParms.setSyncObserver(new MyObserver());