Skip to content

Instantly share code, notes, and snippets.

View nrbrd's full-sized avatar

nara nrbrd

View GitHub Profile
@nrbrd
nrbrd / epubcordova.js
Last active January 20, 2016 19:05
Download and open ePubjs with Cordova/Phonegap on Android - http://goo.gl/iW26Dt
download: function(book, uri){
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem) {
fileSystem.root.getFile("Book/" + book.file_name, {
create : true,
exclusive : false
}, function(fileEntry) {
localPath = fileEntry.toURL();
ft = new FileTransfer();
ft.download(uri, localPath, function(entry) {
getBook(entry);