{"id":2925,"date":"2014-03-10T12:57:17","date_gmt":"2014-03-10T12:57:17","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/phonegap-android-localfilesystem-is-not-defined-collection-of-common-programming-errors\/"},"modified":"2014-03-10T12:57:17","modified_gmt":"2014-03-10T12:57:17","slug":"phonegap-android-localfilesystem-is-not-defined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/10\/phonegap-android-localfilesystem-is-not-defined-collection-of-common-programming-errors\/","title":{"rendered":"Phonegap Android LocalFileSystem is not defined-Collection of common programming errors"},"content":{"rendered":"<p>I have a problem for accessing Android File System for storage purpose in my phonegap application. I&#8217;ve searched and found lots of not-my-situation solutions!<\/p>\n<p>I know about the necessity of deviceready to be fired and checked and it got fired. So the phonegap.js is loaded perfectly!<\/p>\n<p>I think I requested the file permissions and have features in my manifest and config file. here they are:<\/p>\n<p>config.xml:<\/p>\n<pre><code>    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n\n<\/code><\/pre>\n<p>AndroidManifest.xml:<\/p>\n<pre><code>\n\n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n    \n        \n            \n                \n                \n            \n        \n    \n    \n\n<\/code><\/pre>\n<p>and here is the error throwing part of my code:<\/p>\n<pre><code>$(document).ready(function () {\n    document.addEventListener(\"deviceready\", onDeviceReady, false);\n});\nfunction onDeviceReady() {\n    window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function (fileSystem) { \/\/throws the 'Uncaught ReferenceError: LocalFileSystem is not defined' error\n        fileSystem = fileSystem;\n    }, function (evt) {\n        alert(evt.target.error.code);\n    });\n}\n<\/code><\/pre>\n<p>But I get the error for a reason I don&#8217;t have any idea about! Please give me your thought. I appreciate it very much.<\/p>\n<p>PS: I&#8217;m using phonegap 3.0!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have a problem for accessing Android File System for storage purpose in my phonegap application. I&#8217;ve searched and found lots of not-my-situation solutions! I know about the necessity of deviceready to be fired and checked and it got fired. So the phonegap.js is loaded perfectly! I think I requested the file permissions and have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2925","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2925","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2925"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2925\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2925"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2925"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2925"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}