Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.database.sqlite.SQLiteDatabase;

public class Main {
    private static void createUsageHistory(SQLiteDatabase db) {
        String sql = "CREATE TABLE usage_history(" + "package_name TEXT," + "lat REAL, " + "lon REAL,"
                + "weekday INTEGER DEFAULT (strftime('%w', 'now')),"
                + "start_hour INTEGER DEFAULT (strftime('%H', 'now'))," + "use_second INTEGER DEFAULT 1,"
                + "created_at INTEGER DEFAULT (strftime('%s', 'now'))" + ")";
        db.execSQL(sql);
    }
}