0

phonegapでファイルを読み書きする機能が必要です。

元:

function isTextFileEmpty(fileName){
   //this function should return weather the file is empty or not. If file empty then return true... if file is not empty then return false    
}

function getTextFileContent(fileName){
    //this function should return content of the file
}

function writeTextFile(fileName, textContent){
    //this function should write given text in the file
}

www/フォルダーには、userinfo.txt ユーザーがアプリを開くときに、userinfo.txt が空かどうかを確認する必要があります。空の場合、ピン番号を尋ねます...ユーザーはピン番号を入力します...そのとき、ピン番号をテキストファイルに保存します。そのため、次回以降、空でない場合はファイルが空であることを確認します...次に、ファイルからピン番号を取得し、それを使用してJSON経由でサーバーからデータを取得します

4

1 に答える 1

0

関連する Cordova ドキュメントは次のとおりです。http://docs.phonegap.com/en/3.0.0/cordova_file_file.md.html#File

于 2013-08-01T20:41:36.890 に答える