com.eligor
クラス SimplePeriodicSyncManager

java.lang.Object
  上位を拡張 com.eligor.SimplePeriodicSyncManager
すべての実装されたインタフェース:
IPeriodicSyncManager

public class SimplePeriodicSyncManager
extends java.lang.Object

Concrete class that is an implementation of IPeriodicSyncManager.

導入されたバージョン:
1.0.0

フィールドの概要
static int FLAG_NOT_SYNCABLE
           
static int FLAG_SYNCABLE
           
static int FLAG_UNKNOWN
           
 
コンストラクタの概要
SimplePeriodicSyncManager(android.accounts.Account account, java.lang.String authority, FallbackRunnable fallbackRunnable)
          
 
メソッドの概要
 void applySyncPeriod(int period)
          Applies sync period and enqueue the sync request.
 void applySyncPeriod(int period, android.os.Bundle args)
          Applies sync period and enqueue the sync request.
 void cancelSync()
          Cancels current sync progress.
 void disableSync()
          Disables periodic sync.
 void enableSync()
          Enables periodic sync.
 android.accounts.Account getAccount()
          Returns Account that is associated for the periodic sync of the auhtority.
 java.lang.String getAuthority()
          Returns provider authority for the periodic sync.
 FallbackRunnable getFallbackRunnable()
           
 boolean isSyncable()
          Checks if the periodic sync of the provider authority is set as syncable or not.
 boolean isSyncActive()
          Checks if the periodic sync of the provider authority is currently working or not.
 boolean isSyncEnabled()
          Checks if the provider authority has been configured as automatic periodic sync enabled for the account or not.
 boolean isSyncPending()
          Checks if the periodic sync of the provider authority is currently pending to work or not.
 void requestSync()
          Request on demand sync.
 void requestSync(android.os.Bundle args)
          Requests on demand sync.
 void setNotSyncable()
          Sets the provider authority as not syncable.
 void setSyncable()
          Sets the provider authority as syncable.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

FLAG_SYNCABLE

public static final int FLAG_SYNCABLE
関連項目:
定数フィールド値

FLAG_NOT_SYNCABLE

public static final int FLAG_NOT_SYNCABLE
関連項目:
定数フィールド値

FLAG_UNKNOWN

public static final int FLAG_UNKNOWN
関連項目:
定数フィールド値
コンストラクタの詳細

SimplePeriodicSyncManager

public SimplePeriodicSyncManager(@Nonnull
                                 android.accounts.Account account,
                                 @Nonnull
                                 java.lang.String authority,
                                 @Nonnull
                                 FallbackRunnable fallbackRunnable)

メソッドの詳細

applySyncPeriod

public void applySyncPeriod(int period)
Applies sync period and enqueue the sync request. After the successful application, the sync will automatically requested by the framework.

パラメータ:
period - the period of each sync.
関連項目:
ContentResolver.addPeriodicSync(android.accounts.Account, String, android.os.Bundle, long)

applySyncPeriod

public void applySyncPeriod(int period,
                            android.os.Bundle args)
Applies sync period and enqueue the sync request. After the successful application, the sync will automatically requested by the framework.

パラメータ:
period - the period of each sync.
args - extra arguments for the request.
関連項目:
ContentResolver.addPeriodicSync(android.accounts.Account, String, android.os.Bundle, long)

requestSync

public void requestSync()
Request on demand sync.

関連項目:
ContentResolver.requestSync(android.accounts.Account, String, android.os.Bundle)

requestSync

public void requestSync(android.os.Bundle args)
Requests on demand sync.

パラメータ:
args - extra arguments for the request.
関連項目:
ContentResolver.requestSync(android.accounts.Account, String, android.os.Bundle)

cancelSync

public void cancelSync()
Cancels current sync progress.

関連項目:
ContentResolver.cancelSync(android.accounts.Account, String)

enableSync

public void enableSync()
Enables periodic sync.

関連項目:
ContentResolver.setSyncAutomatically(android.accounts.Account, String, boolean)

disableSync

public void disableSync()
Disables periodic sync.

関連項目:
ContentResolver.setSyncAutomatically(android.accounts.Account, String, boolean)

setSyncable

public void setSyncable()
Sets the provider authority as syncable.

関連項目:
ContentResolver.setIsSyncable(android.accounts.Account, String, int)

setNotSyncable

public void setNotSyncable()
Sets the provider authority as not syncable.

関連項目:
ContentResolver.setIsSyncable(android.accounts.Account, String, int)

isSyncable

public boolean isSyncable()
Checks if the periodic sync of the provider authority is set as syncable or not.

戻り値:
true if syncable, false otherwise.
関連項目:
ContentResolver.getIsSyncable(android.accounts.Account, String)

isSyncEnabled

public boolean isSyncEnabled()
Checks if the provider authority has been configured as automatic periodic sync enabled for the account or not.

戻り値:
true if enabled, false otherwise.
関連項目:
ContentResolver.getSyncAutomatically(android.accounts.Account, String)

isSyncActive

public boolean isSyncActive()
Checks if the periodic sync of the provider authority is currently working or not.

戻り値:
true if currently active, false otherwise.
関連項目:
ContentResolver.isSyncActive(android.accounts.Account, String)

isSyncPending

public boolean isSyncPending()
Checks if the periodic sync of the provider authority is currently pending to work or not.

戻り値:
true if currently pending, false otherwise.
関連項目:
ContentResolver.isSyncPending(android.accounts.Account, String)

getAccount

@Nonnull
public android.accounts.Account getAccount()
Returns Account that is associated for the periodic sync of the auhtority.

定義:
インタフェース IPeriodicSyncManager 内の getAccount
戻り値:
an account. May not be null.

getAuthority

@Nonnull
public java.lang.String getAuthority()
Returns provider authority for the periodic sync.

定義:
インタフェース IPeriodicSyncManager 内の getAuthority
戻り値:
an authority. May not be null.

getFallbackRunnable

@Nonnull
public FallbackRunnable getFallbackRunnable()
定義:
インタフェース IPeriodicSyncManager 内の getFallbackRunnable
戻り値: