摘要 |
While a device is offline, usage data is tracked on the device. The usage data is uploaded to a server after the device is again connected to a network. Applications that run on mobile devices typically embed a browser to display content. Unfortunately, mobile devices also frequently disconnect from the associated network. A system tracks usage data by using JavaScript in the browser to communicate with the native device, which then buffers the usage data for future upload. This is done by installing, in each application, a "protocol handler" that listens for a request over a particular protocol. The protocol handler intercepts the requests and stores the usage data locally on the device. Subsequently, when the device detects network connectivity, the device uploads the data to servers that collect data for aggregation and presentation. |