My application not save dbtest.xml and not read when wi-fi turn off. It is file 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);
}
}
On server I add files .manifest, .htaccess and dbtext.xml .manifest look that:
CACHE MANIFEST
# Wersja 0.3
# Jawnie buforowane wpisy
dbtest.xml
# All other resources (e.g. sites) require the user to be online.
NETWORK:
*
.htaccess look that:
<mime-mapping>
<extension>manifest</extension>
<mime-type>text/cache-manifest</mime-type>
</mime-mapping>
And my PhoneGap application not work offline. What i do wrong? I must add some text in other files? What i have to do ? Thanks