I go to a WebView, for example, to Yandex. Then I go to the post office to the registration department. I close the application through the taskbar and reopen it -I see that I am on the original url. How to save the state of the WebView? And in general, you also need to download files and pay via WebView, where you can get acquainted with this in detail, otherwise on the Internet there are only answers to questions how to fix saving data when you rotate the screen. In general, how to save a session?
-
Answer # 1
-
Answer # 2
Well, all about "save after closing the application" is to save the state to the device and restore this state when you open your WebView.
Here you have 3 options in general:
- If the data is simple enough (for example, just a link) then use it.
- If something is more complex then you should probably create a database. Here either use SQLite, or what is simpler and more efficient -connect Room persistence library.
- You can also save to the device as a file. I don’t think this is what you want, but in general you can use this method as well.
As far as I know, there are no other ways to store something after unloading the application from memory (well, or they are not at all obvious)
-
Answer # 3
Replace
MessageDigest.getInstance ("** SHA256 **"); `
on
MessageDigest.getInstance (** "SHA-256" **);
@Sergei Buvaka unfortunately I confused and answered the wrong place, delete if possible
инкогнито2021-09-25 23:58:59You can delete your answer yourself. I can't do it
Sergei Buvaka2021-09-25 23:58:59 -
Answer # 4
Replace
MessageDigest.getInstance ("** SHA256 **"); `
on
MessageDigest.getInstance (** "SHA-256" **);
@Sergei Buvaka unfortunately I confused and answered the wrong place, delete if possible
инкогнито2021-09-25 23:58:59You can delete your answer yourself. I can't do it
Sergei Buvaka2021-09-25 23:58:59
- android : Errors when parsing xml via simplexml converter to retrofit
- android : Chaining requests with RxJava
- android : Koin network module SharedPreferences value not updating
- android : Can't call onResponse in retrofit, onFailure is called all the time
- The problem is in parameter substitution in the API request from the backend. (Retrofit, Ktor, android)
- java : Moshi with Retrofit send empty request when {null, null} is expected
- android : The names of all files in the folder should be recorded, and only the name of the first (Kotlin) is recorded
- android : Rotating text on canvas
- android : Insert in afterTextChanged is not triggered correctly by the line length condition
Well, all about "save after closing the application" is to save the state to the device and restore this state when you open your WebView.
Here you have 3 options in general:
As far as I know, there are no other ways to store something after unloading the application from memory (well, or they are not at all obvious)