12.08.2023

webview service. Android System Webview - what is it, errors and solutions. Interaction with programs


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 to view 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 network. In this article, I will tell you what the Android System Webview program is, introduce the reader to its features, and also tell you how to get rid of errors related to 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 inside various Android OS applications, without having to open a separate browser window for this. ASWV functionality is essentially like a mini-browser, powered by Chrome technology, and like the Chrome app, Android System WebView is included in the core set of Android OS applications (from about Android 4.3 and up) on modern smartphones.

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

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

Google experts recommend first clearing the cached data on the 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 implementing their tasks.

Features of the Android System Webview

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

In addition, for some reason, Google has stopped releasing updates for this application for older versions of the Android OS (in particular, Android 4.3). The reason for this is the banal unwillingness of developers to revise the structure of the program (“we do not want and will not revise the code”), as a result of which the version of the product running on such versions of Android becomes more vulnerable to malware.

Is it worth deleting this app?

Should I disable Android System WebView? Absolutely not. As I pointed out 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 (and even deleting this application using root rights) is highly undesirable, and can lead to various system failures (for one of the users, 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 that you go to the settings of your device, then to “Applications”, find Android System WebView there and tap on it. After going to the information about the application, click on "Stop", then on "Delete 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 (from about Android 4.3 version) that allows you to view web content inside a specific application, without having 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.), therefore it is recommended to regularly monitor its updates and in no case delete this application from your device. This guarantees its stable operation, and you - the pleasure of the reliable functionality of your mobile device.

Several developers from the ICQ messenger team spoke at the last AndroidDevs Meetup meeting. My report was devoted to Android WebView. For all those who could not come to the meeting, I publish here an article based on the speech. I'll go on top, with large strokes. I will not give deep technical details and a lot of code. If you are interested in the details, you can download an application specially written as an illustration from the link at the end of the post, and see everything in examples.

Questions and answers

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

Question: How do you deal with artifacts that are left behind when the WebView is rendered?
Answer: We do not fight with them, we tried - it did not work. This does not happen on all devices. We decided that this is not such a glaring problem as to spend more resources on it.

Question: Sometimes you need to nest a WebView within a ScrollView. This is ugly, but sometimes required on assignment. This is not encouraged, even forbidden somewhere, and after that there are shortcomings in the work. But still, sometimes you have to do it. For example, if you draw a WebView on top, and draw some native component below it (which should be native according to the 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 to, he would scroll down to these native components.
Answer: Unfortunately, I cannot answer you, because I have not encountered such a situation. It is quite specific, and it is difficult for me to imagine the option when you need to put a WebView in a ScrollView.

Question: There is an email application. There's a hat on top with recipients and everything else. Even in this case, not everything will go smoothly. The WebView has big problems when it tries to size itself inside the ScrollView.
Answer: You can try to draw the indicated 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: Even, perhaps, the logic does not need to be transferred, I mean the injection of Java classes. Logic can be left and called through an injected class. Only 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 not rewrite games natively?
Answer: And for this too. But the main idea is to give third-party developers the ability 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 sometimes we debug them right in it.

Question: And if Intent, let's say, throw this toy in Chrome, what problems will there be? If not to write your own WebView, but to 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 will be able to directly interact with ICQ, send various commands to it. For example, a command to get a username, to get the chats that he has open, send messages to the chat directly from ICQ. That is, it will not work from Chrome to send messages directly to ICQ. In our case, all this is possible.

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

Question: Is one megabyte enough?
Answer: Yes. If there are more pictures, then we try to shrink them. I said that if such a need exists, then this can be a solution - cut and reassemble later in Java.

Question: How do you ensure the security of applications running in a sandbox? Did I understand correctly that you need to call injected Java classes from the JavaScript application?
Answer: Yes.

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

If you open the section with system applications on an Android smartphone, you can see a lot of all kinds of applications, the names of most of which do not tell the user anything at all. For example, Android System WebView - what is it?

Android System WebView is the software built into the firmware that is required to view content inside an application. What does it mean? Let's say you've launched a social networking application. You stumble upon a link, click on it and ... In theory, a browser must be launched to open the link, for example, the same Google Chrome. Android System WebView acts as a browser inside the application - the link is launched in it. The Android System WebView is built on top of the WebKit engine.

What is it for? Of course, to save device resources and increase the battery life of the smartphone. In short, the application is really useful.

It is easy to find it, for this go to the section with applications.

Call the menu and click "Show system processes".

Application information.

Is it possible to remove Android System WebView?

There is no "Delete" button on the application page, so without superuser rights you cannot do anything. But even if you are rooted, we strongly recommend neither uninstalling nor freezing this application, since other applications that use Android System WebView will not be able to work stably.

If you experience any problems with the application, clear the cache or data in it.

But, once again, we strongly do not recommend deleting the Android System WebView.

Several developers from the ICQ messenger team spoke at the last AndroidDevs Meetup meeting. My report was devoted to Android WebView. For all those who could not come to the meeting, I publish here an article based on the speech. I'll go on top, with large strokes. I will not give deep technical details and a lot of code. If you are interested in the details, you can download an application specially written as an illustration from the link at the end of the post, and see everything in examples.

Questions and answers

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

Question: How do you deal with artifacts that are left behind when the WebView is rendered?
Answer: We do not fight with them, we tried - it did not work. This does not happen on all devices. We decided that this is not such a glaring problem as to spend more resources on it.

Question: Sometimes you need to nest a WebView within a ScrollView. This is ugly, but sometimes required on assignment. This is not encouraged, even forbidden somewhere, and after that there are shortcomings in the work. But still, sometimes you have to do it. For example, if you draw a WebView on top, and draw some native component below it (which should be native according to the 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 to, he would scroll down to these native components.
Answer: Unfortunately, I cannot answer you, because I have not encountered such a situation. It is quite specific, and it is difficult for me to imagine the option when you need to put a WebView in a ScrollView.

Question: There is an email application. There's a hat on top with recipients and everything else. Even in this case, not everything will go smoothly. The WebView has big problems when it tries to size itself inside the ScrollView.
Answer: You can try to draw the indicated 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: Even, perhaps, the logic does not need to be transferred, I mean the injection of Java classes. Logic can be left and called through an injected class. Only 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 not rewrite games natively?
Answer: And for this too. But the main idea is to give third-party developers the ability 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 sometimes we debug them right in it.

Question: And if Intent, let's say, throw this toy in Chrome, what problems will there be? If not to write your own WebView, but to 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 will be able to directly interact with ICQ, send various commands to it. For example, a command to get a username, to get the chats that he has open, send messages to the chat directly from ICQ. That is, it will not work from Chrome to send messages directly to ICQ. In our case, all this is possible.

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

Question: Is one megabyte enough?
Answer: Yes. If there are more pictures, then we try to shrink them. I said that if such a need exists, then this can be a solution - cut and reassemble later in Java.

Question: How do you ensure the security of applications running in a sandbox? Did I understand correctly that you need to call injected Java classes from the JavaScript application?
Answer: Yes.

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


2023
maccase.ru - Android. Brands. Iron. News