Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;

public class Main {
    public static void insert(SQLiteDatabase db, String title, String pubdate, String itemDetail, String link,
            String firstImgUrl, String sectionTitle) {
        ContentValues values = new ContentValues();
        values.put("title", title);
        values.put("pubdate", pubdate);
        values.put("item_detail", itemDetail);
        values.put("link", link);
        values.put("first_img_url", firstImgUrl);
        values.put("table_name", sectionTitle);
        db.insert("favorite_item", null, values);
        db.close();
    }
}