android-websettings

Disabling email,number detection in android WebView

时光怂恿深爱的人放手 提交于 2019-12-04 20:55:45
I'm developing an app with phonegap+sencha touch2+android. I've one panel showing various content that contains emails, some numbers in textual form. As it's a WebView when I tap on number, andorids default MailCompose Activity starts, when I tap on number Dialer Activity starts. How can I disable this from happening. Is there some config I'm missing from android side before loading url or web settings for WebView. Or something from Phonegap because when I saw log cat it shows following line - DroidGap.startActivityForResult(intent,-1) You should be able to add the following to the <head> of

How can i load image url to fit my webview in android?

余生颓废 提交于 2019-12-03 17:05:24
I am developing an android application.Here i am displaying a url image in webview. But the image is not fit to my webview. some one is suggested to use viewport concept. But i am not able to use that perfectly. I attached my issue in drawing form with explanation. I used mWebView.getSettings().setUseWideViewPort (true); but not get the good result. I need to show the fitted image in all resolution devices including 7inch, 10 inch tablets. So please look at the attached image and suggest me the right way to fit url image in my webview place. I would like to show my image same as in 3rd diagram

How to prevent call of onDestroy() after onPause()?

不问归期 提交于 2019-12-02 02:06:10
问题 In my android application I have noticed that on press of back key, after onPause() automatically, onDestroy() is getting called. How do I prevent the application from calling onDestroy() after onPause()? I dont want to destroy the instances after back key press. On press of Back key, my webview object is getting destroyed. So, I am not able to access the webview again,once I press back key. I have got two URLs. Imagine them as URL1 and URL2. When I launch URL1 in the webview and press back

Android - Programmatically check internet connection and display dialog if notConnected

*爱你&永不变心* 提交于 2019-11-28 23:06:13
I am working on a live project. and when user click on the app. the welcome screen appears(there is a webview on that screen). and if the internet is not connected then the app crashes. Basically, my problem is to check programmatically that is mobile is connected to internet or not. if not then don't fetch the data from webservice into webview and display a dialog box showing "Check your internet connection" while doing research i found many things, and i have tried to implement that. but, its not satisfying my requirement my code is, public boolean isOnline() { ConnectivityManager cm =

Webview cannot accept cookies

£可爱£侵袭症+ 提交于 2019-11-28 10:57:46
I'm creating a WebView based Android app that enables the user to login onto a mobile operator. When I run the app the WebView opens the website but I get a message that the WebView doesn't allow cookies. I've tried various codes that I found here but none of them worked. Can anyone help me? Here is the code I'm using: //in oncreate final CookieSyncManager cookieSyncManager = CookieSyncManager.createInstance(this); final CookieManager cookieManager = CookieManager.getInstance(); cookieManager.setAcceptCookie(true); cookieManager.removeSessionCookie(); String[] cookies = getCookie("https:/

Android - Programmatically check internet connection and display dialog if notConnected

醉酒当歌 提交于 2019-11-27 14:30:49
问题 I am working on a live project. and when user click on the app. the welcome screen appears(there is a webview on that screen). and if the internet is not connected then the app crashes. Basically, my problem is to check programmatically that is mobile is connected to internet or not. if not then don't fetch the data from webservice into webview and display a dialog box showing "Check your internet connection" while doing research i found many things, and i have tried to implement that. but,

Webview cannot accept cookies

岁酱吖の 提交于 2019-11-27 03:54:42
问题 I'm creating a WebView based Android app that enables the user to login onto a mobile operator. When I run the app the WebView opens the website but I get a message that the WebView doesn't allow cookies. I've tried various codes that I found here but none of them worked. Can anyone help me? Here is the code I'm using: //in oncreate final CookieSyncManager cookieSyncManager = CookieSyncManager.createInstance(this); final CookieManager cookieManager = CookieManager.getInstance(); cookieManager

Clicking URLs opens default browser

人走茶凉 提交于 2019-11-26 03:15:39
问题 I have loaded an external URL in my WebView . Now what I need is that when the user clicks on the links on the page loaded, it has to work like a normal browser and open the link in the same WebView . But it\'s opening the default browser and loading the page there? I have enabled JavaScript. But still it\'s not working. Have I forgotten something? 回答1: If you're using a WebView you'll have to intercept the clicks yourself if you don't want the default Android behaviour. You can monitor