Build 1.0_r1(from source)

android.provider
Class Checkin

java.lang.Object
  extended by android.provider.Checkin

public final class Checkin
extends Object

Contract class for CheckinProvider. Describes the exposed database schema, and offers methods to add events and statistics to be uploaded.


Nested Class Summary
static 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.
static interface Checkin.Events
          The events table is a log of important timestamped occurrences.
static interface Checkin.Properties
          The properties table is a set of tagged values sent with every checkin.
static interface Checkin.Stats
          The stats table is a list of counter values indexed by a tag name.
static interface Checkin.TriggerIntent
          Intents with this action cause a checkin attempt.
 
Field Summary
static String AUTHORITY
           
 
Constructor Summary
Checkin()
           
 
Method Summary
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, byte[] crash)
          Helper function to report a crash.
static Uri reportCrash(ContentResolver resolver, CrashData crash)
          Report a crash in CrashData format.
static Uri updateStats(ContentResolver resolver, Checkin.Stats.Tag tag, int count, double sum)
          Helper function to update statistics in the database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORITY

public static final String AUTHORITY
See Also:
Constant Field Values
Constructor Detail

Checkin

public Checkin()
Method Detail

logEvent

public static Uri logEvent(ContentResolver resolver,
                           Checkin.Events.Tag tag,
                           String value)
Helper function to log an event to the database.

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

updateStats

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

reportCrash

public static Uri reportCrash(ContentResolver resolver,
                              byte[] crash)
Helper function to report a crash.

Parameters:
resolver - from Context.getContentResolver()
crash - data from CrashData
Returns:
URI of the crash report that was added

reportCrash

public static Uri reportCrash(ContentResolver resolver,
                              CrashData crash)
Report a crash in CrashData format.

Parameters:
resolver - from Context.getContentResolver()
crash - data to report
Returns:
URI of the crash report that was added

Build 1.0_r1(from source)

Please submit a feedback, bug or feature