There is a lot going on in your code, but this struck me first:
If / do / while
if (cursor.moveToFirst()) {
do {
.....
} while (cursor.moveToNext());
}
This can be written as:
while (cursor.moveToFirst()) {
.....
}
Static / Casing?
This is something you should never see:
db.EPG_TABLE
Either EPG_TABLE is static on DatabaseHandler, in which case you should access it using DatabaseHandler.EPG_TABLE. Or it is a field, and then it should be camelCase.