0
私は、次のコードを使用してGoogleカレンダーのevensを同期させています。しかし、どのように我々は、同期が完了している知っているか、私はあなたが同期ステータスの変更についての通知を取得するためにSyncStatusObserverを使うべきだと思うカレンダー同期が完了したことはどのようにわかりますか?
private void requestCalendarSync()
{
AccountManager aM = AccountManager.get(this);
Account[] accounts = aM.getAccounts();
for (Account account : accounts)
{
int isSyncable = ContentResolver.getIsSyncable(account, CalendarContract.AUTHORITY);
if (isSyncable > 0)
{
Bundle extras = new Bundle();
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
ContentResolver.requestSync(accounts[0], CalendarContract.AUTHORITY, extras);
}
}
}
が他の部分を実行することはありませんが。 –
あなたの考えは正しいですが、私は何かを変えなければなりません.. –