Skip to content

Instantly share code, notes, and snippets.

🏠
back on track

Mocoven mocovenwitch

🏠
back on track
  • Sydney, Australia
Block or report user

Report or block mocovenwitch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mocovenwitch
mocovenwitch / StateMachine
Created Sep 27, 2017 — forked from elandau/StateMachine
Rx based state machine
View StateMachine
package com.netflix.experiments.rx;
import java.util.HashMap;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import rx.Observable;
import rx.Observable.OnSubscribe;
@mocovenwitch
mocovenwitch / enableHTML5AppCache.java
Created Apr 4, 2017 — forked from jaydeepw/enableHTML5AppCache.java
Enabling HTML5 AppCache in Android Webview programatically.
View enableHTML5AppCache.java
private void enableHTML5AppCache() {
webView.getSettings().setDomStorageEnabled(true);
// Set cache size to 8 mb by default. should be more than enough
webView.getSettings().setAppCacheMaxSize(1024*1024*8);
// This next one is crazy. It's the DEFAULT location for your app's cache
// But it didn't work for me without this line
webView.getSettings().setAppCachePath("/data/data/"+ getPackageName() +"/cache");
You can’t perform that action at this time.