コード例 #1
0
  private void insertWifi(Wifi_class s, SQLiteDatabase database) {
    ContentValues values = new ContentValues();
    values.put("destination", s.getDestination());
    values.put("details", s.getDetails());

    values.put("time", s.getTime());

    Log.d("Data:", s.getDestination() + s.getDetails());
    database.insert("wifi_table", null, values);
  }
コード例 #2
0
  public void insertWifi(Wifi_class s) {
    SQLiteDatabase database = this.getWritableDatabase();
    ContentValues values = new ContentValues();
    values.put("destination", s.getDestination());
    values.put("details", s.getDetails());
    values.put("time", s.getTime());

    Log.d("Data:", s.getDestination() + s.getDetails());
    database.insert("wifi_table", null, values);
    database.close();
  }