Skip to content

Instantly share code, notes, and snippets.

@wmbest2
Created December 12, 2010 19:30
Show Gist options
  • Save wmbest2/738257 to your computer and use it in GitHub Desktop.
Save wmbest2/738257 to your computer and use it in GitHub Desktop.
private void insertListings() {
ArrayList<Listing> listings = createListings();
for(Listing listing : listings) {
Log.d(TAG, listing.getChannelNumber());
ContentValues params = new ContentValues();
params.put(Listings.CHANNEL_NUMBER, listing.getChannelNumber());
params.put(Listings.FULL_TITLE, listing.getFullTitle());
params.put(Listings.CATEGORY, listing.getCategory());
params.put(Listings.START_TIME, listing.getStartTime());
params.put(Listings.END_TIME, listing.getEndTime());
params.put(Listings.DURATION, listing.getDuration());
params.put(Listings.LONG_DESCRIPTION, listing.getLongDescription());
params.put(Listings.TV_RATING, listing.getTvRating());
mResolver.insert(mListingsUri, params);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment