Skip to content
Advertisement

Tag: webview

Android studio webview does not allow cors

I creating a android application and i want to load data from my server but if i load the data i get a “TypeError: Failed to fetch”. I have tried many ways. I also tried just to load google.com inside the webpage and it also doesn’t work. All my files: Main_actifity.xml MainActivity.java AndroidManifest.xml I was expecting to load data from

Allow notifications Android webview

Context I’m trying to add push notifications that come from my website. My code: MainActivity.java AndroidManifest.xml activity_main.xml Problem I tried code from this post but it did not help. However, I think that I should allow notifications somewhere. I tried to open my website in a browser and it actually asks the permission while my app does not. (left: browser,

How do I make the background of a WebView transparent?

I have a Maven project in IntelliJ IDEA, using JDK 15 and JavaFX 15. I tried: Set style for WebEngine Set blend mode for WebView Tried WebPage Nothing succeeded. How do I make the background of the WebView transparent? My module-info.java: My pom.xml dependencies: I created a new project and tried to implement the example from the answer. Happened. Unfortunately,

App not compatible on playstore due to android.webkit

I have published my webview app on playstore but after publishing playstore says it not compatible for everyone and when I asked them why is that so they told me that is because it doesn’t have android.webkit. Please let me know what have a missed the code seems fine to me and should be working. public class MainActivity extends AppCompatActivity

How to enable adding bookmarks in android webview

I am creating a browser app for android and I want know is there any code that helps to enable adding bookmarks in android webview. Answer This is something you will have to add yourself, a WebView literally just displays html content. It doesn’t come with all features like for example Chrome. To add/save bookmarks you would need to implement

Is there a way to refresh webView every x seconds?

Now I have this function for reload webView: And it is called on onCreate function The function works but it only runs once Answer Easy to solve as long as the Activity is running in foreground: Note that handler is now a field, out of reloadWebView(). Now call it in your onCreate():

Advertisement