Questions tagged [android-webview]

1

votes
2

answer
948

Views

WebView not Working Properly

I made a url to open through webview and everything worked fine for me except some buttons of the webpage it doesn't respond anything public class browse extends AppCompatActivity { WebView appwebview; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState)...
Jasbin Karki
1

votes
3

answer
1.1k

Views

Webview zoom out programmatically

I have a webview displaying a map as an svg object. Users can zoom in and out using pinch controls. I also have a button outside of webview that should animate zooming out to default zoom level. I'm unable to find a way to write a zoom out javascript code that actually works on webview.
Goran
0

votes
0

answer
19

Views

ReactJS not working in WebView before Android API Level 23

I'm making an Android app that consists mainly of WebViews and shows a React app. The Android app should support as far back as API level 16, but the React app only works at API level 23. The WebView is based on Chromium in Android 4.4, shouldn't it at least work from that version on? I'm not gettin...
DreamsInHD
1

votes
1

answer
419

Views

Android File Chooser not calling from Android Webview

Its a simple WebApp with a Webview in it and there is a registration page with upload file option. trying to open file chooser when click on browse button but there is not response. i assume that there is some issue in my gradle files. please help me debug it. Here is my Code. here is my project gra...
WaqasArshad
1

votes
1

answer
31

Views

How do I correctly implement Android Viewport Spoofing?

I've recently built an app that uses a full screen web view to load a website I don't own. (Therefore, no control of site code) I need the webview to display a desktop version of the site, and desktop http header spoofing didn't do the trick. I found that it's the viewport size that determines wheth...
Matt Zabojnik
1

votes
2

answer
212

Views

Call js at OnPageStarted sometimes not work in Reusable WebView

I have implemented a reusable WebView. When I use WebView, I get WebView from pool. After using it, clear that WebView (reset settings, load about:blank and clear history) and return to pool. In my code, I need to call some js at OnPageStarted. But When I use reused WebView (which currently shows ab...
lext
1

votes
2

answer
782

Views

Web view desn't load on Oreo

Web view content doe not load in Oreo android. It keeps loading and then show white screen what could be the possible issue ? `WebView mwebView = (WebView) findViewById(R.id.myWebView); WebSettings webSettings = mwebView.getSettings(); webSettings.setJavaScriptEnabled(true); //improve webView perfo...
Chinthaka Devinda
1

votes
0

answer
383

Views

Download instead of load url in WebView when url contains x

I have an Android app that is pretty much a WebView containing a mobile website. I have minimum control over the code of the website but can inject javascript. The website contains download links to PDF, DOC, ZIP etc. files, with most of them only accessible if the user is logged in. At first I simp...
s1h4d0w
1

votes
0

answer
141

Views

WebView history not working on Android 7.0 and 8.0

webView history does not work properly. When you use webView.goBack() to navigate back to the page visited before, sometimes this page is skipped and the webView goes back to the first visited webpage. Other times the history is simply empty resulting in webView.canGoBack() returning false, althoug...
LOGAN
1

votes
3

answer
509

Views

webview loads webpage, but some contents get vanished after loading (Android Studio)

I tried to view http://artikelweb.com in a webview. The web page appears nicely. But, whenever I go to any author link from 'Popular Authors' section, the web page appears, but, after loading, the quotes aren't showing. In Google Chrome Browser(mobile) the quotes appear after loading, but, in my a...
Sayem
1

votes
1

answer
528

Views

Android WebView - JWT Authentication

I have an Android app that I'm switching from basic auth to JWT so that, among other reasons, I don't have to store the user's password locally. This is working well for all of my API requests, but one part of my app uses a WebView to show custom content that is hosted on my server. This content als...
Stonz2
1

votes
0

answer
798

Views

Add Authorization header to all requests in Xamarin Forms Android WebView

I'm trying to add custom http headers to a webview client (for authorization). It seems to work in some cases, I'am able to login to a webpage without entering username and password, and I get redirected to another page. But when the page is calling other resources to get elements populated with dat...
Henrik
1

votes
0

answer
152

Views

Aborting XMLHttpRequest In Android Webview

I have Android App that contains a Webview (Android API 25). In that Webview i am trying to open a webpage that does a network speed test. To implement the speed test i am trying to download a file from my server using XMLHttpRequest (GET method). After 10 seconds i am trying to stop the download by...
Shai
1

votes
2

answer
72

Views

Reading a Text File Stored Online

I am trying to read a text file which is stored online in my Android Studio application. I have tried some code which seems to crash my app as soon as the app opens. Here is the code which I have tried: protected void onCreate(Bundle savedInstanceState) { getWindow().setFlags(WindowManager.LayoutPar...
hinch
1

votes
1

answer
211

Views

Android Webview signout issue

In my webview app when I run the app for the first time and log out from a user session, close the app and then when I open the app again instead of asking user credentials I find myself already logged in. I tried clearing cookies but then it always require sign in on every restart. I only want it t...
Anand
1

votes
0

answer
124

Views

How to implement persistentcookiejar with webview

I am using https://github.com/franmontiel/PersistentCookieJar I would like to know how to integrate it with my webiew. I'm showing my current code which does not store cookies. I searched for how to use okhttp3/retrofit2 for storing cookie and I got codes for using them but none shows how to use the...
Somnath Pal
1

votes
1

answer
35

Views

Phone screen turns white after clicking back from Android Webview

I am using Android Webview to load some web content into my app. The loading page has some Javascript content, so I have to set the ' webSettings.setJavaScriptEnabled(true)' as true, the problem is when i click back from the webpage whole phone screen turns to white blank screen. I found one more th...
Faizal Malik
1

votes
0

answer
105

Views

Android accessibility service FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY is deprecated

Android accessibility service FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY is deprecated. Does it have any alternative? FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY added in API level 18 int FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY This constant was deprecated in API level 26. No longer used Constant Value: 8...
Maor Hadad
1

votes
1

answer
620

Views

WebView error on Marshmallow

I'm testing my app, and when I'll open a WebView with a player of videos (X web page) it Crash ... I'm getting the following error: (Tablet, 1 GB Ram with S.O Marshmallow 6.0.1 ) W/cr_media: Requires BLUETOOTH permission D/cr_Ime: [InputMethodManagerWrapper.java:30] Constructor W/cr_AwContents: onDe...
CJara
1

votes
0

answer
350

Views

How to upload captured image from Camera to a webview

I have this html which works perfectly if I open it with chrome application and let the user to make a photo with the camera and upload it. After selecting the photo captured by the camera, the name of the file is displayed and with the submit button I can upload the photo. Select image to upload: T...
NullPointerException
1

votes
0

answer
501

Views

Google Play app rejected - SSL Error Handler

Below is the message I get from Google Play. After I read the message, I take a look on Google Help Center article. For what I thought, this should be related to the class of WebViewClient and some of its methods like onReceivedSslError, SslErrorHandler.proceed() or SslErrorHandler.cancel(). Then in...
Pak Ho Cheung
1

votes
1

answer
148

Views

Webview Status Code in Xamarin Android

I checked this following java resource to get the status code of Webview for Xamarin Android from c#. As from Xamarin documentation WebResourceResponse(String, String, Stream) Stream api is of type System.IO.Stream. I need to convert Java.IO.InputStream to System.IO.Stream. Is it possible convert t...
Murshid Hassen
1

votes
1

answer
168

Views

Opening an external file through a WebView in Android Studio

So I have been at it for a while, and I really cannot get it to work. What I want is this: To access some file outside the project folder through a WebView. Here is some code that I have been trying to get it working: String url = 'file://///\\myProjectName' + Environment.getExternalStorageDirectory...
Casper Hansen
1

votes
1

answer
804

Views

Fileupload in webview not working

I am using webview to upload a file but select file button does not work. If I open website directly in web browser it works. WebView myWebView = findViewById(R.id.webview); myWebView.setWebChromeClient(new WebChromeClient()); myWebView.getSettings().setJavaScriptEnabled(true); myWebView.getSettings...
yuva phalle
1

votes
0

answer
181

Views

Creating an interactive seating map in Android Studio using either a custom layout or webview

So I'm on my first android project and I'm implementing a native app. One of the components is to book a seat on a seating map. General specifications: Handle venues that have different seating layouts and amount of seats, over 200 The seats can have different sizes and shapes, i.e. large round VI...
WebOrNative
1

votes
0

answer
60

Views

Android WebView pause sound on Activity onPause

Background music from WebView keep playing when a user hits the home button. I am testing that on an Android 8.0 phone. I have tried multiple solution from other thread (also tried using reflection as suggested on some threads). Unfortunately, nothing has worked for me. I am calling webview.onPause(...
TareK Khoury
1

votes
0

answer
264

Views

Detecting when the keyboard is active in a webview

I have not yet found any way to solve this on stack. I have a webview in my app. I want to be able to detect when the keyboard is active and when it is not active. It seems as if it cant detect these changes when they happon in a webview. I want to perform actions on these different states. On iOS...
The Normal One
1

votes
1

answer
28

Views

Set Cookie time format android

I am trying to set cookie manually inside android webview but I want to know how to generate this expiry time. What is this date format? 'Thursday, December 31, 2020, 11:59:59 PM'
Chinthaka Devinda
1

votes
1

answer
997

Views

Cordova website doesn't load fully

I have my Android native project which has it's cordova SystemWebView init. Happens only on real device not on Emulator: Works well on Android 6.0, but On Android 7.0+ devices the website doesn't load and I am getting this error message: Rejecting re-init on previously-failed class java.lang.Class:...
Karoly
1

votes
1

answer
556

Views

How to inspect network requests and responses happened in Android System WebView remotely?

Recently I have a problem in inspecting network requests and responses happened in Android System WebView. The problem is that our app sometimes failed to load some urls with Android System WebView, but we can not get enough information to trace these cases. Tools like Fiddler or Charles have some l...
javayhu
1

votes
0

answer
129

Views

Adding custom menu options and removing some default

When opening default menu on WebView I have some default menus. I wish to remove some like 'Share','Select All','Web Search' and leave 'Copy', 'Paste' and after them add some of my menu options. For now I accomplish to remove some and add mine only before the 'Copy' and 'Paste'. I have 2 questions:...
Dim
1

votes
1

answer
92

Views

First html page opens but clicking any link within that page causes crash the app

My WebView open a local html file when the app starts. It opens perfectly but any link within that page causes a crash of the app when clicked. On the bug report, it says, signal 6 (SIGABRT), code-6 (SI_TKILL), fault addr ----- Abort message: 'art/runtime/java_vm_ext:cc:475] JNI DETECTED ERROR IN AP...
Ashonko
1

votes
0

answer
36

Views

unable to make a webview that contains html from string too look like most websites mobile versions (text goes out of the scree/ screen too small)

I have a wordpress website with Json API installed. Now I want to take the posts content and put it in a webview that has normal margins, breaklines that prevent the text to go out of the screen, prevent zoom in or zoom out (or these will just increase/ decrease font size), and consistent font size...
Negev Asaf
1

votes
1

answer
262

Views

Facebook chat button of my website in android webview is not opening the messenger app

I have a website which is integrated with facebook chat option. I made a webview of my website and can see that chat button in my android app but the problem is on clicking on the chat button it is not redirecting me to messenger app installed in my phone instead it is redirecting me to a page writt...
RAHUL PANDEY
1

votes
0

answer
63

Views

Content in web view gets shrinking and disappears at the end while scrolling (marquee)?

I am implementing a web view with marquee effect. I have a string and loaded it as HTML content by doing the below code. String test= 'this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this...
Jayesh M
1

votes
3

answer
114

Views

WebView null reference

I have problem with push notification bar in my android app... When user tries to press button on it, my app crashes throwing null object reference error: E/AndroidRuntime: FATAL EXCEPTION: IntentService[NotificationActionService] Process: tk.ypod.ypod, PID: 24013 java.lang.NullPointerException: Att...
DonatasP
1

votes
0

answer
232

Views

flutter setJavaScriptEnabled setWebChromeClient

how to enable flutter_webview_plugin 0.1.5 to enable javascript and process javascript came from webpage ? here is the code in android mWebView = (WebView) findViewById(R.id.activity_main_webview); WebSettings webSettings = mWebView.getSettings(); webSettings.setJavaScriptEnabled(true); mWebView.set...
user2839496
1

votes
1

answer
54

Views

Exit android webview if authentication failed

My android application has a custom login page. Once a user submit the username and password with my custom login page, the program will redirect user using WebView and insert those information into the login form and submit the form with the following JavaScript code public void onPageFinished(Web...
Hugo
1

votes
0

answer
41

Views

Unable to Download large File from Google Drive in Andriod Webview using External Browser

I made an app that loads the local html file from assest folder inside Android webview which contains list of links to Download Files from Google Drive which I uploaded before. But When I tested the app, I was able to download the file with Small Size from but when I clicked on the link of Larger f...
Bir Nepali
1

votes
0

answer
38

Views

Android WebView viewport overflow on text searching

I have an activity with a simple WebView. Its content fits the screen width. But when I run findAllAsync() command to highlight some text in the content the component width overflows the screen. If I search the second time the overflow is gone, the third time - appears again and so on. It also happe...
mortalis

View additional questions