I'm trying to create a backup of my apps database contents and for most devices it works fine but a few have wal mode enabled by default which causes an issue. From everything I've read calling "pragma wal_checkpoint" should flush the contents of a -wal file into the main database file which is what I'm after. Flush the contents to main db file and then copy the db file for backup. I'm calling
db.rawQuery("pragma wal_checkpoint;", null);
but it doesn't seem to be working. Any ideas?