Skip to content

Commit

Permalink
persist in full screen
Browse files Browse the repository at this point in the history
  • Loading branch information
José Redrejo committed Dec 20, 2023
1 parent 8510d08 commit f1735e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void onDestroy() {
@Override
public void onTaskRemoved(Intent rootIntent) {
super.onTaskRemoved(rootIntent);
//sticky servcie runtime/restart is managed by the OS. leave it running when app is closed
//sticky service runtime/restart is managed by the OS. leave it running when app is closed
if (startType() != START_STICKY) {
stopSelf();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.view.View;
import android.webkit.CookieManager;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
Expand Down Expand Up @@ -30,7 +31,18 @@ public static void configureWebview(PythonActivity activity) {
// Configure the WebView to allow fullscreen based on:
// https://stackoverflow.com/questions/15768837/playing-html5-video-on-fullscreen-in-android-webview/56186877#56186877
public void configure() {
mWebView.setWebViewClient(new WebViewClient());
mWebView.setWebViewClient(new WebViewClient() {

@Override
public void onPageFinished(WebView view, String url) {
CookieManager.getInstance().setAcceptCookie(true);
CookieManager.getInstance().acceptCookie();
CookieManager.getInstance().flush();

}


});
mWebView.setWebChromeClient(mChrome);
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
Expand Down

0 comments on commit f1735e6

Please sign in to comment.