Can WebView do like browser? - java

I have a question bothering me for these few days, I want to implement browser-like WebView, which has add/close tab and open multiple websites. But after I searched through many forums and documentation still couldn't find any solution for this, wondering can WebView do exactly what phone browser can do?

This is answered by the documentation.
Building web apps in WebView
If you want to deliver a web application (or just a web page) as a part of a client application, you can do it using WebView. The WebView class is an extension of Android's View class that allows you to display web pages as a part of your activity layout. It does not include any features of a fully developed web browser, such as navigation controls or an address bar. All that WebView does, by default, is show a web page.
So the answer to your question is No. The WebView class cannot do exactly what a phone browser can do.
This does not stop you from implementing missing browser features for yourself ... starting with WebView. However, the javadoc for WebView states this:
In most cases, we recommend using a standard web browser, like Chrome, to deliver content to the user. To learn more about web browsers, read the guide on invoking a browser with an intent.
And more ...

Related

Can't login to Facebook using WebView Android

This may seem like a similar question in Stackoverflow but it's not because all the solutions there didn't work.
Facebook announced that they will not be supporting to login to Facebook using native WebView and use their SDK instead. However, my app is a browser app and I can't use their SDK just for this. Yes, I tried using a popup window to log in but it doesn't work for all websites, some websites don't open Facebook login in a popup but instead on the same page.
The weird part about it is that there are many apps on the app store that use WebView and they can log in with no issues while I'm getting this error:
I tried changing the user agent, but it didn't work. I tried using Chrome Custom Tabs but I don't really know to catch the callback when the user has logged in Chrome's tabs then continue in my webview.

Receive Data from android application in asp.net page

In my project I've a requirement in which I want to receive data in page load event of my asp.net application page sent by an android application. I've been through all the concepts over internet but unable to find the proper answers or any kind of code. Moreover, I also want to know that is the question I've asked it is Programmatically possible.
Note: Our Android Application also uses WebView feature of android, and displays an aspx page.

Reader Mode for Android WebView

I'm looking for a way to open a URL in a web view in reader mode. Is this possible to do in a simple web view? I've looked and have found other questions about this but they have no answers.
This is simply not possible, the Webview API has been created long before this feature existed and the API does not provide a way of activating arbitrary chrome features which are added to Chrome later.
You could however use Chrome Custom Tabs, and then app users could enable it themselves if Chrome decides to show the "Show simplifed view" popup.
After a lot of research I finally ended using the following library to display my news articles in my android app
You can check this out,
Reader-Mode-Gouse-Mohiddin-Android-Link-Preview-Library

How to Integrate web-cam with a web page

I am developing a web application using Java (Servlet, JSP). In a JSP page, I want to show the web camera window to the user. When client clicks a button "Capture", then I should be able to capture the image and store it in some place.
I have done a lot of research, but could not find a satisfactory solution.
That's where the beauty of Applet comes in. Facebook has an Applet that connects to the PC camera and does capturing.
This site provides a good example in JSP:
http://thenerdinme.com/do-it-yourself/how-to-take-screenshots-with-java/
Why do not use something like flex which provides better support for this?

Android app for a web application without an API

Is it possible to create an Android app for an existing web application which doesn't provide any API?
Webview just provides a crude view of the same web app in Android, but interface with webview looks crappy.
What you're asking is very possible. Just load up your URL in the webview and then redirect all clicks to go back to the same view. There you have an embedded website into an application.
What do you mean by interface for WebView looks crappy? You can make it look like anything native on the phone.
If you want your web page to have the look and feel of a native android app without creating the native app, you'll need to do so using javascript on your served page. Take a look at http://jquerymobile.com/ which seems to do a lot of the leg work. You can use that javascript and a little elbow grease to accomplish what you describe.

Categories

Resources