2019.8.25 curriculum design case

A day to complete the task

   Today the discussion on how to get from the vehicle, the way we envisaged that by acquiring gps location information, latitude and longitude and then uploaded to the server has been calculated to obtain the distance between the two vehicles. Today, learning how to use the database in Android, also did not complete.

Concept map:

 

 Android itself comes with SQLite database, but we are more familiar for MySQL, about which database to use have to be discussed.

Code:

public class MainActivity extends AppCompatActivity {


    private MyDatabaseHelper dbHelper;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        dbHelper = new MyDatabaseHelper(this,"BookStore.db",null,1);
        Button createDatabase = (Button) findViewById(R.id.create_database);
        createDatabase.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//创建或打开现有的数据库
                dbHelper.getWritableDatabase();
            }
        });
    }
}

 

  Second, the next day's program

  1. Optimize APP pictures.

  2. Continue to learn to use the database of Android.

  3. The use of the database to the project.

Third, Daily Summary

  1. Although the learned database, but the database for the introduction of Android do not understand, need to learn.

  Published on 2.GitHub codes easy to use, it can be directly introduced to facilitate version control.

   Today the discussion on how to get from the vehicle, the way we envisaged that by acquiring gps location information, latitude and longitude and then uploaded to the server has been calculated to obtain the distance between the two vehicles. Today, learning how to use the database in Android, also did not complete.

Concept map:

 

 Android itself comes with SQLite database, but we are more familiar for MySQL, about which database to use have to be discussed.

Code:

public class MainActivity extends AppCompatActivity {


    private MyDatabaseHelper dbHelper;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        dbHelper = new MyDatabaseHelper(this,"BookStore.db",null,1);
        Button createDatabase = (Button) findViewById(R.id.create_database);
        createDatabase.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//创建或打开现有的数据库
                dbHelper.getWritableDatabase();
            }
        });
    }
}

 

  Second, the next day's program

  1. Optimize APP pictures.

  2. Continue to learn to use the database of Android.

  3. The use of the database to the project.

Third, Daily Summary

  1. Although the learned database, but the database for the introduction of Android do not understand, need to learn.

  Published on 2.GitHub codes easy to use, it can be directly introduced to facilitate version control.

Guess you like

Origin www.cnblogs.com/hj609/p/11408666.html