Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions reflex-dom/java/org/reflexfrp/reflexdom/MainWidget.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@

public class MainWidget {
private static Object startMainWidget(final HaskellActivity a, String url, long jsaddleCallbacks, final String initialJS) {
CookieManager.setAcceptFileSchemeCookies(true); //TODO: Can we do this just for our own WebView?

// Remove title and notification bars
a.requestWindowFeature(Window.FEATURE_NO_TITLE);

Expand All @@ -43,6 +41,11 @@ private static Object startMainWidget(final HaskellActivity a, String url, long
ws.setJavaScriptEnabled(true);
ws.setDomStorageEnabled(true);
wv.setWebContentsDebuggingEnabled(true);
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.setAcceptThirdPartyCookies(wv, true);
cookieManager.setAcceptFileSchemeCookies(true); //TODO: Can we do this just for our own WebView?

// allow video to play without user interaction
wv.getSettings().setMediaPlaybackRequiresUserGesture(false);
final AtomicBoolean jsaddleLoaded = new AtomicBoolean(false);
Expand Down Expand Up @@ -79,8 +82,7 @@ public WebResourceResponse shouldInterceptRequest (WebView view, WebResourceRequ
catch (IOException e) {
Log.i("reflex", "Opening resource failed, Webview will handle the request ..");
e.printStackTrace();
}

}
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion reflex-dom/reflex-dom.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ library
hs-source-dirs: src
if os(android)
hs-source-dirs: src-android
other-modules: Reflex.Dom.Android.MainWidget
exposed-modules: Reflex.Dom.Android.MainWidget
build-depends:
aeson >= 1.4 && < 2.2,
android-activity == 0.2.*,
Expand Down
Loading