i am loading the following URL in to a WebView:
http://crm.unitask-inc.com/dotproject/DP/
in android v4.x it works fine.
in android 2.x when i try to enter text in to the text fields.
the keyboard shows up and i can heare the ticking while typing.
i but no text is entered to the text box.
I tried to set the focus of the WebView, but it didn't help.
Any ideas?
Thanks a lot
Avi
It's not problem with Android 2.x. It's problem with "Https" url in android 2.x
May this help you....
Android soft keyboard hides inputs from CordovaWebView when in fullscreen
I don't think there is a bug with WebView for your issue. I'm currently using it with 2.2 to 4.3 versions of devices and I never had a problem as you described.
You can test it with an url like google to define your problem again. As I see problem comes from your page at url http://crm.unitask-inc.com/dotproject/DP/
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
WebView webView = new WebView(this);
setContentView(webView);
webView.loadUrl("http://www.google.com");
}
BTW, I've tested google's url on 2.2 Nexus One (Emulator) Device. Didn't have any problem there.
Edit: I've tested your url on 2.2 Nexus One (Emulator) Device and 4.3 Galaxy Nexus device. They only showed 3 blinking dot on a blue page. Never saw the entry page.
android:windowSoftInputMode="adjustResize"
For more info refer this answer.
Related
I recently detected an issue what I can only reproduce with a Samsung Galaxy S5 and Android 5.x (not with a HTC One, Android 5.x).
When opening a link in a WebView (target=_blank), then nothing happens. I can see an exception in the Logcat output, but the WebView WebViewClient Method shouldOverrideUrlLoading is never called (There I create an intent what opens the url).
My current workaround is to remove the target=_blank from all links - but does anyone knows if this is a Bug or a normal behaviour and I've set something wrong?
Thanks
The android app that i'm building has a webview that loads a mobile website. On most phones the webview loads perfect but on some phones with android 4.4.2 the webview loads perfect the first time but when you open the app after you paused or closed it it will just show a white screen.
Now the question is - what am i doing wrong and why is this problem only on some devices?
I had the same issue - but with different Android versions.
For me adding the following helped. Still investigating if I can narrow down the phones for which this is necessary.
webview.settings.apply {
cacheMode = WebSettings.LOAD_NO_CACHE
setAppCacheEnabled(false)
}
It's Kotlin obviously.
Enable the WebView cache by using the following properties:
webview.getSettings().setAppCacheMaxSize(1024*1024*8);
webview.getSettings().setAppCachePath("/data/data/com.your.package.appname/cache");
webview.getSettings().setAppCacheEnabled(true);
webview.getSettings().setCacheMode(WebSettings.LOAD_DEFAULT);
I have a issue about Android WebView.
It's OK on Android version gingerbread.
But ICS is not OK.
I just tried change element using $.post.
after that, stop the screen and graphic was broken.
after touching the screen, screen changes OK.
how can I fix this issue?
plz help me.
I Just use simple JQuery code.
$.get("pages/somepage.html", function(data) {
var text = '<div>'+data+'</div>';
$('.content').html(text); });
I think this issue from difference between 2.3.3 and 4.0.3 webview.
I don't know what it is. I guess web engine or webkit something.
Is there a certified way of enabling flash in a webview? I have a Samsung Galaxy S3 with ICS installed. flash works in my normal browser(the default browser that says Internet on the icon). I made an app which has webview in its layout. I load the same page in this webview and flash doesn't work. I tried adding the following line in onCreate of my main activity:
WebView webView1=(WebView)findViewById(...)
webView1.getSettings().setPluginState(WebView.PluginState.ON);
but doesn't work. I also tried using setPluginsEnabled(deprecated) but that also didn't work. Also, I set
android:hardwareAccelerated="true"
in menifest file in the application tag. But it still doesn't work.
So has anyone made it work? Please help.
Could it be a problem related to Javascript not being enabled on the webview?
myWebView.getSettings().setJavaScriptEnabled(true);
I had forgotten to enable javascript. Did that and it worked like a charm.
I am having a problem that only happens on my Motorola Xoom which I have updated to 3.2 through OTA. I have a simple application that uses a WebView to load a small html that has flash content in it. Here is the code snippet.
mWebView = (WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);
I know it is correct because it can run fine on my Samsung Galaxy S running Android 2.2. Anybody else seen this problem? Any idea how I can solve this problem?
Many thanks and I am really stuck here.
Try to build your application with the latest android Api (13), and activate hardware acceleration (same link, just a little below) on your activity that need to display flash.