What does the android system webview app do. Android System Webview - what is it, errors and solutions

At the last AndroidDevs Meetup, several developers from the ICQ messenger team spoke. My report was dedicated to Android WebView. For everyone who was unable to come to the meeting, I am publishing here an article based on the speech. I'll go over the tops, with large strokes. I won’t give deep technical details or a lot of code. If you are interested in the details, using the link at the end of the post you can download the application, specially written as an illustration, and see everything with examples.

Questions and answers

Question: There is a CrossWalk project - a third-party implementation of WebView that allows you to use the latest Chrome on older devices. Do you have any experience, have you tried to embed it?
Answer: I haven't tried it. Currently, we support Android starting from version 14 and no longer focus on older devices.

Question: How do you deal with artifacts that remain when rendering a WebView?
Answer: We don’t fight them, we tried but it didn’t work. This does not happen on all devices. We decided that this was not such a glaring problem that we should spend more resources on it.

Question: Sometimes you need to nest a WebView inside a ScrollView. It's not pretty, but sometimes it's required on assignment. This is not encouraged, even prohibited somewhere, and after this there are shortcomings in work. But sometimes you still have to do it. For example, if you draw a WebView on top, and below it draw some native component (which should be native as per requirement), and all this should be done as a single ScrollView. That is, first the user would look at the entire page, and then, if he wanted, he would scroll down to these native components.
Answer: Unfortunately, I cannot answer you because I have not encountered such a situation. It’s quite specific, and it’s hard for me to imagine an option where you need to put a WebView in a ScrollView.

Question: There is an email application. There's a hat on top with the recipients and everything else. Even then, not everything will be smooth sailing. The WebView has big problems when it tries to determine its size inside the ScrollView.
Answer: You can try to render the designated part of the UI inside the WebView.

Question: That is, completely transfer all the logic from the native part to the WebView and leave these containers?
Answer: It may even be that there is no need to transfer the logic; this means injection of Java classes. The logic can be left and called through the injected class. Only the UI can be transferred to WebView.

Question: You mentioned games in the messenger. Are they web applications?
Answer: Yes, these are web pages with JavaScript inside a WebView.

Question: Are you doing all this just to avoid rewriting games natively?
Answer: And for this too. But the main idea is to give third-party developers the opportunity to create applications that can be embedded in ICQ, and using this ICQ Web API to interact with the messenger.

Question: So these games can also be played through a web browser on a laptop?
Answer: Yes. It can be opened in a web browser, and we sometimes debug them directly in it.

Question: And if Intent, let’s say, throws this toy into Chrome, what problems will there be then? What if you don’t write your own WebView, but use the services?
Answer: The problem is that in our WebView we can provide an API through Java class injection, and with the help of this API the application can directly interact with ICQ and send various commands to it. Let's say a command to get a user's name, to get chats that are open for him, to send messages to the chat directly from ICQ. That is, you won’t be able to send messages directly to ICQ from Chrome. In our case, all this is possible.

Question: You mentioned that you cut the data into one megabyte chunks. How do you then collect them?
Answer: We don't do this now because we don't have such a need.

Question: Is one megabyte enough?
Answer: Yes. If the pictures are larger, then we try to compress them. I said that if such a need exists, then this could be a solution - cutting and reassembling later in Java.

Question: How do you ensure that applications run safely in a sandbox? Did I understand correctly that injected Java classes need to be called from a JavaScript application?
Answer: Yes.

Question: How will security be ensured in this case? Is access to any system functions prohibited?
Answer: Right now, since the system is still quite young, we mostly use our own web applications and we trust them completely. In the future, all applications that will come to us will be administered, the code will be reviewed, and a special Security Team has been allocated for this. Additionally, a special permission system will be created, without which applications will not be able to access any information critical to the user.

Users of devices based on Android OS, looking through the list of installed software, find among familiar software and system applications that they know nothing about. One such program is Android System WebView. It can be found among running applications or when you receive an update notification. Sometimes, when manually cleaning in order to free up space in the device’s memory, inexperienced users remove everything they can get their hands on, while it is better not to touch some system components to avoid causing damage to the system. Of course, such applications cannot be removed without root rights, but even stopping their work can lead to unpleasant consequences. Thus, it is also undesirable to remove the Android System WebView software.

Purpose of the Android system webview application.

The natural desire of a user who discovers the software for the first time will be to find out what kind of Android System WebView it is and what tasks this software performs, as well as whether it can be deleted. The Chrome-based program is pre-installed and is a system component of the Android OS, it is used to process web content within different applications, as a result of which there is no need to switch to browsers. That is, thanks to WebView, website content can be displayed directly in programs. If we take social networking applications as an example, then when viewing a news feed and following links, you will not be redirected to the browser, but will see the content without leaving the messenger. This is the essence of the functioning of this tool, and now you have an idea of ​​​​what Android System WebView is. System software is installed by default on devices with Android 4.2.2 and higher. If the device does not have it, for example, you deleted it using root access, without knowing what kind of program it is, then you can install the application from the Play Market store, and updates are also downloaded from here. In this case, it is better to use WebView, starting from version Android 5.0 due to the use of a large number of resources, which loads the device with numerous processes (memory consumption, etc. directly depends on the number of running programs and games). In addition, product support for earlier versions of the OS has been discontinued.

What applications use Android System WebView

Considering why software is needed, to make it more clear, let’s give an example of several software products that use System WebView as a tool for viewing Internet content in their environment:

This is just a small list of software that uses WebView. Weather applications, social networks, instant messengers and many others have this built-in option. Software developers can add browser functionality to their product by introducing the WebView library into it, installing the component in the layout, and initializing it in code. It is also necessary to enable JavaScript support so that pages where it is implemented work correctly, and add permissions to access the Internet. In order for users to be able to open links directly inside the software, they will need to install WebViewClient.

How to enable Android System WebView

On Android version 7 and higher, the service is inactive by default. These tasks are assigned to Google Chrome tools and built-in program tools. That is, there is no particular need to activate the software in question, but if you want WebView rather than Chrome to work, the first service is disabled and Android System WebView is enabled, since they do not function together. Activation can be performed using various methods.

Method one:

  • In the “Applications” section we find Google Chrome and disable it by clicking the corresponding button.
  • Install or update Android System WebView from the Play Market.
  • Now all that remains is to launch any software that uses WebView, and the service will start automatically. Let's say we go from the device settings to the “About the device” - “Legal Information” section and select “Google Legal Information”, then open any link.
  • The WebView application will be activated, but when you turn on Chrome, it will turn off again.

Method two:

The procedure is a little more complicated, and it’s not always possible, but if the first method failed to connect the service, do the following:

  • Go to settings and in the “About phone” section select “Build number”.
  • With a few clicks we activate the developer mode (press until you receive the corresponding notification).
  • In the “For Developers” section we find “WebView Service”.
  • Here you can select a tool for handling web links within applications.

Possible problems and solutions

As a rule, the service works properly, but sometimes errors may still occur. Since WebView for Android versions up to version 5 is no longer supported, this has led to the emergence of vulnerabilities in the software. Error notifications may appear when you launch some programs, games, or use a browser. The fix is ​​to clear the application data. To do this we do the following:

  • Go to the device settings, select “Applications”.
  • In the list of software we find Android System WebView (ASW), click.
  • Here we click the “Clear data” and “Clear cache” buttons.

In some cases the method does not work. You can also try stopping the service and uninstalling updates, and then downloading the full System WebView update. In addition, it would be a good idea to check if there is enough memory on the device; sometimes moving the application to the SD card can help. Often, users get tired of pop-up notifications about the need to update software. The problem can be fixed simply:

  • Go to the Google Play Market application store and update the ASW component.
  • If the error repeats, which is likely on devices with Android 7 and higher, you should also update Google Chrome.

If all methods for correcting service failures are powerless, all that remains is to perform a reset to factory settings, having previously made a backup copy of the data. But this is an extreme measure and most often there is no need to resort to such actions.

How to Uninstall Android System WebView App

The ability to remove any software is always present, even if not obvious, as is the case with system components. Having seen the gluttony of Android System WebView in its processes, many users are wondering whether it is possible to remove this application. In standard mode, you cannot remove system software, so if the goal is to completely get rid of the service, you will have to tinker with obtaining root rights, which will allow you to do whatever your heart desires with the operating system. At the same time, root access is not the only solution with which you can stop the program.

It is highly not recommended to remove System WebView if you have Android version below version seven, as this will entail a number of errors and failures. The service is used by many applications, so you should not count on their correct operation after uninstalling or disabling the tool. In addition to the inability to open built-in links within programs, you will experience other system failures, and the problem can take a fairly serious form, for example, in the form of a cyclic reboot of the device. Now let's move on to the question of whether it is possible to disable the Android System WebView service if you still do not have root rights, you have an operating system of the seventh version or higher, and you do not find the application useful. In this case, the software can only be stopped. To do this, perform the following steps, applicable to stop any Android software:

  • Let's go to the device settings.
  • Let's move on to the "Applications" section here.
  • Select Android System from the list
  • Click the buttons “Stop”, “Uninstall updates”, then “Clear data”.
  • These actions will stop the program from running.

We do not recommend deleting system applications. Root rights in the wrong hands can harm the device, although even without them, some user actions are even more destructive than viruses and can cause considerable damage to the system.

As for WebView specifically, if alternative software is supported on your smartphone, and you decide to use another tool that performs the same tasks, the service will simply be inactive, so there is no need to worry about using its resources.

At the last AndroidDevs Meetup, several developers from the ICQ messenger team spoke. My report was dedicated to Android WebView. For everyone who was unable to come to the meeting, I am publishing here an article based on the speech. I'll go over the tops, with large strokes. I won’t give deep technical details or a lot of code. If you are interested in the details, using the link at the end of the post you can download the application, specially written as an illustration, and see everything with examples.

Questions and answers

Question: There is a CrossWalk project - a third-party implementation of WebView that allows you to use the latest Chrome on older devices. Do you have any experience, have you tried to embed it?
Answer: I haven't tried it. Currently, we support Android starting from version 14 and no longer focus on older devices.

Question: How do you deal with artifacts that remain when rendering a WebView?
Answer: We don’t fight them, we tried but it didn’t work. This does not happen on all devices. We decided that this was not such a glaring problem that we should spend more resources on it.

Question: Sometimes you need to nest a WebView inside a ScrollView. It's not pretty, but sometimes it's required on assignment. This is not encouraged, even prohibited somewhere, and after this there are shortcomings in work. But sometimes you still have to do it. For example, if you draw a WebView on top, and below it draw some native component (which should be native as per requirement), and all this should be done as a single ScrollView. That is, first the user would look at the entire page, and then, if he wanted, he would scroll down to these native components.
Answer: Unfortunately, I cannot answer you because I have not encountered such a situation. It’s quite specific, and it’s hard for me to imagine an option where you need to put a WebView in a ScrollView.

Question: There is an email application. There's a hat on top with the recipients and everything else. Even then, not everything will be smooth sailing. The WebView has big problems when it tries to determine its size inside the ScrollView.
Answer: You can try to render the designated part of the UI inside the WebView.

Question: That is, completely transfer all the logic from the native part to the WebView and leave these containers?
Answer: It may even be that there is no need to transfer the logic; this means injection of Java classes. The logic can be left and called through the injected class. Only the UI can be transferred to WebView.

Question: You mentioned games in the messenger. Are they web applications?
Answer: Yes, these are web pages with JavaScript inside a WebView.

Question: Are you doing all this just to avoid rewriting games natively?
Answer: And for this too. But the main idea is to give third-party developers the opportunity to create applications that can be embedded in ICQ, and using this ICQ Web API to interact with the messenger.

Question: So these games can also be played through a web browser on a laptop?
Answer: Yes. It can be opened in a web browser, and we sometimes debug them directly in it.

Question: And if Intent, let’s say, throws this toy into Chrome, what problems will there be then? What if you don’t write your own WebView, but use the services?
Answer: The problem is that in our WebView we can provide an API through Java class injection, and with the help of this API the application can directly interact with ICQ and send various commands to it. Let's say a command to get a user's name, to get chats that are open for him, to send messages to the chat directly from ICQ. That is, you won’t be able to send messages directly to ICQ from Chrome. In our case, all this is possible.

Question: You mentioned that you cut the data into one megabyte chunks. How do you then collect them?
Answer: We don't do this now because we don't have such a need.

Question: Is one megabyte enough?
Answer: Yes. If the pictures are larger, then we try to compress them. I said that if such a need exists, then this could be a solution - cutting and reassembling later in Java.

Question: How do you ensure that applications run safely in a sandbox? Did I understand correctly that injected Java classes need to be called from a JavaScript application?
Answer: Yes.

Question: How will security be ensured in this case? Is access to any system functions prohibited?
Answer: Right now, since the system is still quite young, we mostly use our own web applications and we trust them completely. In the future, all applications that will come to us will be administered, the code will be reviewed, and a special Security Team has been allocated for this. Additionally, a special permission system will be created, without which applications will not be able to access any information critical to the user.

A number of users of modern gadgets based on the Android OS, when viewing the list of programs preinstalled on the device, may stumble upon an application "Android System WebView". This application was created by Google programmers and is designed for viewing web content inside other applications. At the same time, ASWV is not free from various errors, glitches and other problems, and often it is the unstable operation of this application that forces the user to look for detailed information about it on the Internet. In this article, I will tell you what this Android System Webview program is, introduce the reader to its features, and also tell you how to get rid of errors associated with the functionality of this application.

What is Android System WebView

As I wrote above, Android System WebView is an application that allows you to embed web browsing within various Android OS applications, without the need to open a separate browser window for this. ASWV's functionality essentially resembles a mini-browser, running on Chrome technology, and, like the Chrome application, Android System WebView is included in the basic set of Android OS applications (from approximately Android 4.3 and above) on modern smartphones.

According to user reviews, using this application with various dependent browsers (for example, Naked Browser) can significantly save smartphone battery power. Regular mobile versions of popular browsers such as Chrome or Firefox, running on their own engine, consume significantly larger amounts of battery power.

If you figure out that this is Android System WebView and want to download it, the best way to do this is from the Play Store. At the moment, the latest version of the application is 57.0.2987.88, and you can download the latest version of the product from the Play Market (link).

Google experts recommend first clearing cached data on your phone - instructions on VR-Boom.ru, and then updating the Android System Webview application, since sometimes there are vulnerabilities that allow attackers to access it. Updates allow you to install the necessary “patches” and thereby prevent attackers from achieving their goals.

Features of Android System Webview

After we have figured out what kind of Android System Webview application this is, let's move on to describing the features of this application. Experts note that this application is very resource intensive (considerable memory resources are consumed, which, in some cases, can slow down the normal operation of the system).

In addition, Google, for certain reasons, has stopped releasing updates for this application for older versions of the Android OS (in particular, Android 4.3). The reason for this is said to be the banal reluctance of developers to revise the structure of the program (“we don’t want and won’t revise the code”), as a result of which the version of the product running on such versions of Android becomes more vulnerable to malware.

Should I delete this application?

Should I disable Android System WebView? Absolutely not. As I mentioned above, a number of mobile applications use the built-in capabilities of the Android System WebView for their work. In particular, the functionality of this application is used by such programs as:

Therefore, stopping (or even deleting this application using root rights) is extremely undesirable, and can lead to various malfunctions in the system (for one user, deleting this application led to a cyclic reboot of his device).

If Android System Webview is buggy

If you encounter errors in the operation of this application and the message “An error occurred in the android system webview application,” then I recommend going to the settings of your device, then to “Applications”, find Android System WebView there and tap on it. When you go to the application details, click on “Stop”, then on “Uninstall updates”, “Clear data”, “Clear cache”.

Conclusion

When considering the topic of the program, it is worth noting that the Android System Webview application is an important attribute of the functionality of the Android OS (approximately from Android 4.3), which allows you to view web content within a specific application, without the need to open a separate browser window for this. Its functionality is in demand by a number of third-party programs (in particular, several mobile browsers, ICQ messenger, etc.), so it is recommended to regularly monitor its updates, and under no circumstances delete this application from your device. This guarantees its stable operation, and you will enjoy the reliable functionality of your mobile device.