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()
ServiceManager
dispatch
in interface ServiceManager
public void setDispatchPeriod(int dispatchPeriodInSeconds)
ServiceManager
dispatchPeriod
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 ServiceManager
dispatchPeriodInSeconds
- the new dispatch periodpublic void updateConnectivityStatus(boolean connected)
ServiceManager
updateConnectivityStatus
in interface ServiceManager
connected
- true if there is a valid network connection