我不想立即将数据发送到google-analytics。我想在android中每隔10分钟定期将数据发送到它。如何实现。
最佳答案
我不是应用程序程序员,但是according to the documentation数据在任何情况下都仅每30分钟发送一次(不是立即发送)。
同样,调度期似乎可以通过多种方式配置:
// Set the dispatch period in seconds.
GoogleAnalytics.getInstance(this).setLocalDispatchPeriod(30);
//To set the dispatch period in the XML configuration file:
<integer name="ga_dispatchPeriod">30</integer>
Setting a zero or negative value will disable periodic dispatch, requiring that you use manual dispatch if you want to send any data to Google Analytics.
// Disable periodic dispatch by setting dispatch period to a value less than 1.
GoogleAnalytics.getInstance(this).setLocalDispatchPeriod(0);
关于android - 每10分钟如何将数据发送到Google Analytics(分析)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36444212/