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経由でサーバーからデータを取得します