Skip to content

Commit 76cf5e7

Browse files
committed
Removed hardcoded webview load file location
1 parent 14f61aa commit 76cf5e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonforandroid/bootstraps/webview/build/src/org/kivy/android/PythonActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void onClick(DialogInterface dialog,int id) {
130130
// Set up the webview
131131
mWebView = new WebView(this);
132132
mWebView.getSettings().setJavaScriptEnabled(true);
133-
mWebView.loadUrl("file:///data/data/net.inclem.flasktest/files/load.html");
133+
mWebView.loadUrl("file:///" + mActivity.getFilesDir().getAbsolutePath() + "/load.html");
134134

135135
mWebView.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
136136
mWebView.setWebViewClient(new WebViewClient() {

0 commit comments

Comments
 (0)