2013-10-02 3 views
0

안드로이드에서 window.requestFileSystem을 사용하고 있습니다. 그러나 오류 코드 9으로 실패합니다. 나는 here 안드로이드 장치에 SD 카드가없는 문제를 읽었습니다. 이것은 내가 사용하는 코드입니다안드로이드 phonegap에서 window.requestFileSystem이 실패합니다.

window.requestFileSystem(2, 0, function(file_system) { 
       console.log('got fs'); 
       callback(null, file_system); 
      }, function(err) { 
       console.log('not getting library fs'+err.code); 
       callback(err); 
      }); 

어떻게 이것을 Android에서 사용할 수 있습니까?

답변

0

공식 문서에 따르면, requestFileSystem의 첫 번째 매개 변수는 상수 LocalFileSystem.PERSISTENT 또는 LocalFileSystem.TEMPORARY

하려고 다음과 같은 표준 문이어야한다 :

window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(f){ /* sucess */ }, function(e){ /* error */); 
관련 문제