packager icon indicating copy to clipboard operation
packager copied to clipboard

Save local variables in Android applications using WebView and HTML

Open Alestore opened this issue 2 years ago • 6 comments

Just thinking if such a thing can be done. I tried with Appinventor 2 but it appears to be read only. Same thing for Android Studio by following the guide found in TurboWarp's Android support here on GitHub still being worked on.

Alestore avatar Oct 02 '22 14:10 Alestore

Is there any chance of being able to do this? @GarboMuffin

Alestore avatar Oct 25 '22 20:10 Alestore

I'm putting this on the weekend to do list. Unfortunately Android is not something I have a lot of experience in, so I can't promise I'll figure anything out.

GarboMuffin avatar Oct 26 '22 00:10 GarboMuffin

I'm putting this on the weekend to do list. Unfortunately Android is not something I have a lot of experience in, so I can't promise I'll figure anything out.

If you need more information, there is this Website 2 APK (https://websitetoapk.com/) that converts HTML projects into Android applications, and apparently saves Cloud variables as well. I don't know how it does it, maybe instead of using a WebView, a proprietary Browser opens inside the app and in doing so manages to save the data. The only limitation of this application is that in order to use it properly, especially to publish it on the play store simply to get an application key and rest, you have to pay $ 79 to $ 129 a year. Which is also a lot for what it has to do, which is to display an HTML, which I have already managed to do with Appinventor 2 and Android Studio, with the only problem of having to save the Cloud variables. If we don't find any solution, I think I'll temporarily opt for that as soon as I have the money to do it. Thanks as always for your work, and even if that is not the issue, now that I can I am going to support you by subscribing to you from GitHub or wherever I can do it for real money.

Alestore avatar Oct 26 '22 05:10 Alestore

I won't have access to a computer with Android Studio on it until this weekend, but it sounds like you have a local copy of something like #224. If you go into MainActivity and add web.settings.domStorageEnabled = true after web.settings.javaScriptEnabled = true, does it work?

GarboMuffin avatar Oct 26 '22 06:10 GarboMuffin

I won't have access to a computer with Android Studio on it until this weekend, but it sounds like you have a local copy of something like #224. If you go into MainActivity and add web.settings.domStorageEnabled = true after web.settings.javaScriptEnabled = true, does it work?

I'll test this out later today or at least tomorrow and will let you know. Thanks again for your work!

Alestore avatar Oct 26 '22 07:10 Alestore

@GarboMuffin it absolutely WORKS!

The last point to understand to launch Android "support" is #566

Alestore avatar Oct 26 '22 16:10 Alestore