public class GAServiceManager extends java.lang.Object implements ServiceManager
AnalyticsStore and controlling
dispatch.
Sample calls:
GAServiceManager.getInstance().dispatch(); GAServiceManager.getInstance().setDispatchPeriod(180);
| Modifier and Type | Method and Description |
|---|---|
void |
dispatch()
Dispatches queued hits (view, events, or transactions) to Google Analytics
if a network connection is available.
|
static GAServiceManager |
getInstance() |
void |
setDispatchPeriod(int dispatchPeriodInSeconds)
Sets dispatch period for the dispatcher.
|
void |
updateConnectivityStatus(boolean connected)
Updates the network connection status in the ServiceManager.
|
public static GAServiceManager getInstance()
public void dispatch()
ServiceManagerdispatch in interface ServiceManagerpublic void setDispatchPeriod(int dispatchPeriodInSeconds)
ServiceManagerdispatchPeriod
seconds. If a negative dispatch period is given, automatic dispatch will
not be enabled, and the application will need to dispatch events
manually using ServiceManager.dispatch(). If zero, dispatching will happen on
every hit.setDispatchPeriod in interface ServiceManagerdispatchPeriodInSeconds - the new dispatch periodpublic void updateConnectivityStatus(boolean connected)
ServiceManagerupdateConnectivityStatus in interface ServiceManagerconnected - true if there is a valid network connection