• 个人冲刺(四阶段)——体温上报app(一阶段)


    任务:完成了后台数据库的类模块

    MyDBHelper.java

    package com.example.helloworld;
    
    import android.content.Context;
    import android.database.sqlite.SQLiteDatabase;
    import android.database.sqlite.SQLiteOpenHelper;
    import android.widget.Toast;
    
    import androidx.annotation.Nullable;
    
    public class MyDBHelper extends SQLiteOpenHelper {
        private Context context;
        public MyDBHelper(Context context,String name,int version) {
            super(context, name, null, version);
            this.context=context;
        }
    
        @Override
        public void onCreate(SQLiteDatabase db) {
            String sql="create table personwendu(id integer primary key autoincrement, address varchar, name varchar, wendu varchar, dateandtime varchar)";
            db.execSQL(sql);
            Toast.makeText(context,"数据加入成",Toast.LENGTH_LONG).show();
        }
    
        @Override
        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    
        }
    }
  • 相关阅读:
    systemmap 使用记录
    reading code record
    吞吐问题
    debug cps 原因
    fopen的a+和rewind
    debug cps && perf debug
    tfo以及quic的阅读笔记
    ss 和netstat
    debug open files
    多核编程 local global
  • 原文地址:https://www.cnblogs.com/zyj3955/p/14869627.html
Copyright © 2020-2023  润新知