android-webview

Automatically login to Gmail using a WebView?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 22:06:17
问题 I'd like to use the user's Gmail username and password to automatically login to Gmail inside a WebView . Is there any existing code how to do this, as I'm having trouble with it (which hidden fields need to be posted, getting/re-injecting the cookie). I have tried to simply fill in the username/password-fields using JavaScript, which works, but on submitting the login-form (using JavaScript again), the WebView asks the users whether he/she wants the password to be saved, which I need to

Toast does not work in webview

北慕城南 提交于 2019-12-22 19:26:51
问题 Here is my code, this is literally step by step from developer.android.com and it just doesn't work, no matter how many times I run it. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView

Toast does not work in webview

戏子无情 提交于 2019-12-22 19:25:09
问题 Here is my code, this is literally step by step from developer.android.com and it just doesn't work, no matter how many times I run it. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView

Automatic reload webview when internet connection change

▼魔方 西西 提交于 2019-12-22 18:12:30
问题 When connection get back I want to run this task, I want to call NewortchangeReceiver() constructor. I wrote "android.net.conn.CONNECTIVITY_CHANGE" in Mainactivity IntentFilter because "android.net.conn.CONNECTIVITY_CHANGE" not work in androidmanifest.xml in android N (7). I want to automatic reload webview at internet connection change. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); wvDailyDarshan = (WebView)

Zooming in/out on Android Webview without a set limit

橙三吉。 提交于 2019-12-22 17:50:45
问题 In my current project I need my users to be able to scroll over and zoom in on large SVG Images. A major problem i encountered though, is the limit the android WebView class puts on zooming in and out. Is there any way I can remove or change these limits to my own likings? The standard zoom controls do not seem to support releasing these boundries. If my question is unclear, or if I need to elaborate on my question do not hesitate to ask. Greets, Wottah 回答1: Since no one seems to have come up

Android webview don't scroll in 2.3 but it work in 3.0 and 4.0

一曲冷凌霜 提交于 2019-12-22 17:33:53
问题 I have a problem with a webview. Its load an url similar to this: <html> <head><meta name="viewport" content="width=device-width"/></head> <body> <div id="header"></div> <div id="scrollable-content"><!--a lot of stuff inside here--></div> <div id="footer"></div> </body> </html> "scrollable-content" has overflown-y = auto in css(i also tried overflown-y=scroll) and nothing I cant scroll in android 2.3, for what i read it is becouse of the meta viewport. But i cant take it off becouse it is

Uncaught TypeError: Cannot set property 'value' of > null" in Android

纵然是瞬间 提交于 2019-12-22 10:57:15
问题 I try to update information through java script code in Android side . On Android version 4.3, it's work. But Android version 4.4, it appeared these error, so can not update information. [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot set property 'value' of null", source: (1) I/chromium﹕ [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot set property 'value' of null", source: (1) I/chromium﹕ [INFO:CONSOLE(1)] "Uncaught TypeError: Cannot call method 'submit' of null", source: (1) I know from Android

Saving WebView page to cache

限于喜欢 提交于 2019-12-22 09:41:07
问题 I have an app with WebView and I want the app to save the website the first time it is connected to the internet so that a further connection is no longer needed. I know some people are saving WebView pages to cache. I've done some research and I found some answers like this one. But the problem is that I would need some example code on how to do this. Could someone give me an example on how to save a webpage .html file to external storage on Android? This is the only code i've got at the

Save webpage for offline use and invoke the same android

流过昼夜 提交于 2019-12-22 09:24:30
问题 I am having an android application requirement where i need to open saved web pages, how to do the same?? FIrst of all, how can we save a webpage with its dependancies on android and later open it in your applications? Any inputs will be of great help! 回答1: This is how I would implement that: Save original web page into a file Parse saved file and get all image URLs. Save images into the same directory. Convert URL of the images(bind all links to a local copies) Here is simple code which

Save webpage for offline use and invoke the same android

杀马特。学长 韩版系。学妹 提交于 2019-12-22 09:24:13
问题 I am having an android application requirement where i need to open saved web pages, how to do the same?? FIrst of all, how can we save a webpage with its dependancies on android and later open it in your applications? Any inputs will be of great help! 回答1: This is how I would implement that: Save original web page into a file Parse saved file and get all image URLs. Save images into the same directory. Convert URL of the images(bind all links to a local copies) Here is simple code which