The following slides give an Android SQLite project.
Slide 11.1: An Android SQLite project
Slide 11.2: Manifest file
Slide 11.3: Layout XML code
Slide 11.4: Strings and the R file
Slide 11.5: Java source code
Slide 11.6: TestDatabase.java
Slide 11.7: TestDatabase.java (cont.)
Slide 11.8: TestDatabase.java (cont.)
Slide 11.9: TestDatabase.java (cont.)
Slide 11.10: TestDatabase.java (cont.)
Slide 11.11: CommentsDataSource.java
Slide 11.12: CommentsDataSource.java (cont.)
Slide 11.13: CommentsDataSource.java (cont.)
Slide 11.14: CommentsDataSource.java (cont.)
Slide 11.15: CommentsDataSource.java (cont.)
Slide 11.16: CommentsDataSource.java (cont.)
Slide 11.17: MySQLiteHelper.java
Slide 11.18: MySQLiteHelper.java (cont.)
Slide 11.19: MySQLiteHelper.java (cont.)
Slide 11.20: Comment.java
Slide 11.a: Android SQLite construction (video: 25:52 minutes)
The code is correct, but you may need to use an emulator with a high API like API 35 in order to make it work.
|
|
|
|
|