-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadingDB.java
More file actions
34 lines (24 loc) · 1.16 KB
/
readingDB.java
File metadata and controls
34 lines (24 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
public void readingDB(){
String SQL_SELECT_patID = "";
Cursor cursorRecordings;
SQLiteDatabase sqLiteDatabase;
sqLiteDatabase = SQLiteDatabase.openDatabase(Environment.getExternalStorageDirectory().getAbsolutePath() + "/foo/databases/24-08-2021_1056_database.db",
null, SQLiteDatabase.OPEN_READONLY
| SQLiteDatabase.NO_LOCALIZED_COLLATORS
| SQLiteDatabase.CREATE_IF_NECESSARY);
if(sqLiteDatabase == null){
Log.e(TAG, "No database");
}
SQL_SELECT_patID = "SELECT * FROM AudioDetails";
cursorRecordings = sqLiteDatabase.rawQuery(SQL_SELECT_patID,null);
if (cursorRecordings.moveToFirst()) {
do {
Log.e(TAG, "audio_ID: "+
cursorRecordings.getString(0) + ", Id: " +
cursorRecordings.getString(1) + ", server pat id: " +
cursorRecordings.getString(7) + ", server_id: " +
cursorRecordings.getString(11)
);
}while(cursorRecordings.moveToNext());
}
}