Package 

Class TrackerDatasource


  • 
    public final class TrackerDatasource
    
                        

    Tracker datasource. Wraps SQLite queries (DAO).

    • Constructor Detail

      • TrackerDatasource

        TrackerDatasource(Context context)
    • Method Detail

      • clearDB

         void clearDB()

        Clear all content

      • addEvent

         boolean addEvent(Event event)

        Add an event to the database

        Parameters:
        event - Event to add
      • deleteEvents

         int deleteEvents(Array<String> eventIDs)

        Delete events by their ID

        Parameters:
        eventIDs - IDs of the events to delete
      • deleteOverflowEvents

         int deleteOverflowEvents(int limit)

        Delete events if there's too much in DB

        Parameters:
        limit - maximum number of events wanted
      • close

         void close()

        Close the datasource. You should not make any other call to this datasource once this has been called.