Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread LocalStorage Android
Tue, Jan 21 2014 6:38 AMPermanent Link

tristar

Avatar

Heya guys!

I'm making simple application and I need store some data in LocalStorage. It works ok on chrome or other browsers but when I use this on Android device it can not store data. Any clue how to use LocalStorage on Android?

Little background:

I created simple WebView application with AndroidStudio, and when is running it shows index.html created by EWB. I can install APK file to Android device, I use this permissions for the WebView application:

   <uses-permission android:name="android.permission.INTERNET"></uses-permission>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

I have attached my simple todo example project. Smile

Thanks in advance!



Attachments: ToDo.zip
Tue, Jan 21 2014 8:06 AMPermanent Link

tristar

Avatar

Ok. Here is solution to that problem:

webSettings.setDomStorageEnabled(true);

this line is need in AndroidStudio project for WebView..  so thanks for reading anyway Smile

<<tristar wrote:

Heya guys!

I'm making simple application and I need store some data in LocalStorage. It works ok on chrome or other browsers but when I use this on Android device it can not store data. Any clue how to use LocalStorage on Android?

Little background:

I created simple WebView application with AndroidStudio, and when is running it shows index.html created by EWB. I can install APK file to Android device, I use this permissions for the WebView application:

   <uses-permission android:name="android.permission.INTERNET"></uses-permission>
   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>

I have attached my simple todo example project. Smile

Thanks in advance!>>
Tue, Jan 21 2014 10:12 AMPermanent Link

Matthew Jones

Thanks for posting the solution.

/Matthew Jones/
Image