public final class

Checkin

extends Object
java.lang.Object
   ↳ android.provider.Checkin

Class Overview

Contract class for the checkin provider, used to store events and statistics that will be uploaded to a checkin server eventually. Describes the exposed database schema, and offers methods to add events and statistics to be uploaded. TODO: Move this to vendor/google when we have a home for it.

Summary

Nested Classes
interface Checkin.Crashes The crashes table is a log of crash reports, kept separate from the general event log because crashes are large, important, and bursty. 
interface Checkin.Events The events table is a log of important timestamped occurrences. 
interface Checkin.Properties The properties table is a set of tagged values sent with every checkin. 
interface Checkin.Stats The stats table is a list of counter values indexed by a tag name. 
interface Checkin.TriggerIntent Intents with this action cause a checkin attempt. 
Constants
String AUTHORITY
Public Constructors
Checkin()
Public Methods
static Uri logEvent(ContentResolver resolver, Checkin.Events.Tag tag, String value)
Helper function to log an event to the database.
static Uri reportCrash(ContentResolver resolver, CrashData crash)
Report a crash in CrashData format.
static Uri reportCrash(ContentResolver resolver, byte[] crash)
Helper function to report a crash.
static Uri updateStats(ContentResolver resolver, Checkin.Stats.Tag tag, int count, double sum)
Helper function to update statistics in the database.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String AUTHORITY

Constant Value: "android.server.checkin"

Public Constructors

public Checkin ()

Public Methods

public static Uri logEvent (ContentResolver resolver, Checkin.Events.Tag tag, String value)

Helper function to log an event to the database.

Parameters
resolver from getContentResolver()
tag identifying the type of event being recorded
value associated with event, if any
Returns
  • URI of the event that was added

public static Uri reportCrash (ContentResolver resolver, CrashData crash)

Report a crash in CrashData format.

Parameters
resolver from getContentResolver()
crash data to report
Returns
  • URI of the crash report that was added

public static Uri reportCrash (ContentResolver resolver, byte[] crash)

Helper function to report a crash.

Parameters
resolver from getContentResolver()
crash data from CrashData
Returns
  • URI of the crash report that was added

public static Uri updateStats (ContentResolver resolver, Checkin.Stats.Tag tag, int count, double sum)

Helper function to update statistics in the database. Note that multiple updates to the same tag will be combined.

Parameters
tag identifying what is being observed
count of occurrences
sum of some value over these occurrences
Returns
  • URI of the statistic that was returned