Results 1 to 5 of 5

Thread: How read write file txt un Sencha Touch

  1. #1
    Sencha User
    Join Date
    Nov 2014
    Posts
    47

    Default How read write file txt un Sencha Touch

    I want to save/load app settings locally.

    I put my json url in resources/url.txt file. Now I want to read that url and put in store.

    How can I do that? I also want to write/edit the text in it. Any clue where to start?

    I did follow this indexedDB sample guide, https://github.com/yupitz/IndexedDB

    I can write data in indexedDB, but no clue how to read it. Please advice.

  2. #2
    Sencha - Engineering israelroldan's Avatar
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    395
    Answers
    25

    Default

    It would be easier/faster to use HTML5's localStorage API.
    Israel Roldán | Senior Software Engineer (Framework tools)

  3. #3
    Sencha User
    Join Date
    Nov 2014
    Posts
    47

    Default

    I did use localstorage previously. Unfortunately, some Android Devices did not work well with localstorage. Android 4.1 above had no issues. Tested on my device Android 4.03, localstorage not working at all. Then I use webSQL. Work well. Now instead of using webSQL, I want to implement a settings storing such as using config.ini in my apps.

  4. #4
    Sencha Premium Member u25771's Avatar
    Join Date
    Sep 2012
    Location
    Switzerland :)
    Posts
    253
    Answers
    27

    Default

    Quote Originally Posted by cygnosis View Post
    I did use localstorage previously. Unfortunately, some Android Devices did not work well with localstorage. Android 4.1 above had no issues. Tested on my device Android 4.03, localstorage not working at all. Then I use webSQL. Work well. Now instead of using webSQL, I want to implement a settings storing such as using config.ini in my apps.
    I could make you an example how to use it but would take some time... Just before I invest the time 1 question: Are you aware that indexdb is not stable at all except of Firefox? Why don't you write & read a real config.ini file instead of using db's? Also easier to update when you have new releases...
    Mark thread as answered if your problem could be solved and leave a vote for helpful answers

    For more help check out my new blog: http://abitofcoding.blogspot.com

    T
    o get in contact with me just send me a message on Google+

  5. #5
    Sencha User
    Join Date
    Nov 2014
    Posts
    47

    Default

    Quote Originally Posted by u25771 View Post
    I could make you an example how to use it but would take some time... Just before I invest the time 1 question: Are you aware that indexdb is not stable at all except of Firefox?
    Yes, I'm aware of that that problem. I did try playing around with indexdb and it much complicated compare to webSQL.

    Quote Originally Posted by u25771 View Post
    Why don't you write & read a real config.ini file instead of using db's? Also easier to update when you have new releases...
    That is what I want to do. There is a way in cordova(not sure how yet) and then do not know how in Sencha. At the end I get more confuse how to begin.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •