|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.webkit.WebSyncManager
android.webkit.CookieSyncManager
public final class CookieSyncManager
The class CookieSyncManager is used to synchronize the browser cookies between RAM and FLASH. To get the best performance, browser cookie is saved in RAM. We use a separate thread to sync the cookies between RAM and FLASH on a timer base.
To use the CookieSyncManager, the host application has to call the following when the application starts.
CookieSyncManager.createInstance(context)
To set up for sync, the host application has to call
CookieSyncManager.getInstance().startSync()
in its Activity.onResume(), and call
CookieSyncManager.getInstance().stopSync()
in its Activity.onStop().
To get instant sync instead of waiting for the timer to trigger, the host can call
CookieSyncManager.getInstance().sync()
| Field Summary |
|---|
| Fields inherited from class android.webkit.WebSyncManager |
|---|
LOGTAG, mDataBase, mHandler |
| Method Summary | |
|---|---|
(package private) void |
clearAllCookies()
Package level api, called from CookieManager Clear all cookies in the database |
(package private) void |
clearExpiredCookies(long now)
Package level api, called from CookieManager Clear all expired cookies in the database |
(package private) void |
clearSessionCookies()
Package level api, called from CookieManager Clear all session cookies in the database |
static CookieSyncManager |
createInstance(Context context)
Create a singleton CookieSyncManager within a context |
(package private) ArrayList<CookieManager.Cookie> |
getCookiesForDomain(String domain)
Package level api, called from CookieManager Get all the cookies which matches a given base domain. |
static CookieSyncManager |
getInstance()
Singleton access to a CookieSyncManager. |
(package private) boolean |
hasCookies()
Returns true if there are any saved cookies. |
protected void |
syncFromRamToFlash()
|
| Methods inherited from class android.webkit.WebSyncManager |
|---|
clone, onSyncInit, resetSync, run, startSync, stopSync, sync |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CookieSyncManager getInstance()
CookieSyncManager. An
IllegalStateException will be thrown if
createInstance(Context) is not called before.
public static CookieSyncManager createInstance(Context context)
context -
ArrayList<CookieManager.Cookie> getCookiesForDomain(String domain)
domain -
void clearAllCookies()
boolean hasCookies()
void clearSessionCookies()
void clearExpiredCookies(long now)
protected void syncFromRamToFlash()
syncFromRamToFlash in class WebSyncManager
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||