내 응용 프로그램은 dbtest.xml을 저장하지 않고 wi-fi가 꺼지면 읽을 수 없습니다.HTML5 Android Phonegap 웹 응용 프로그램 오프라인 캐시 매니페스트
<mime-mapping>
<extension>manifest</extension>
<mime-type>text/cache-manifest</mime-type>
</mime-mapping>
:
CACHE MANIFEST
# Wersja 0.3
# Jawnie buforowane wpisy
dbtest.xml
# All other resources (e.g. sites) require the user to be online.
NETWORK:
*
그 모습 htaccess로 : 내가 별도로 .manifest, htaccess로하고 dbtext.xml 그 모습 .manifest 파일을 추가 서버에서 파일 CordovaApp.java
package io.cordova.hellocordova;
import android.os.Bundle;
import android.webkit.WebSettings;
import org.apache.cordova.*;
public class CordovaApp extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.init();
this.appView.getSettings().setDomStorageEnabled(true);
this.appView.getSettings().setAppCacheMaxSize(1024 * 1024 * 15);
String appCachePath = getApplicationContext().getCacheDir().getAbsolutePath();
this.appView.getSettings().setAppCachePath(appCachePath);
this.appView.getSettings().setAllowFileAccess(true);
this.appView.getSettings().setAppCacheEnabled(true);
// Set by <content src="index.html" /> in config.xml
loadUrl(launchUrl);
}
}
입니다
내 PhoneGap 응용 프로그램이 오프라인으로 작동하지 않습니다. 내가 뭘 잘못 했니? 다른 파일에 텍스트를 추가해야합니까? 내가 뭘해야 해? 감사합니다
이미 페이지의 지침에 따라 모든 작업이 완료되었습니다. 응용 프로그램은 wi-fi에서 작동하며 때로는 오프라인에서 10 분 동안 꺼지는 경우도 있습니다. 그런 다음 데이터가 사라집니다. 그 원인은 무엇일까요? – tomal271
은 RAM 상태에 따라 다르며 웹 페이지를 지울 수 있습니까? – jenuine