1. Lorenzo Saraiva's Avatar
    Hello guys! Me and my team are from Brazil, and we're developing a native Blackberry 10 app with the IDE, using HTML, QML, JS and C++, but we're having a problem when it comes to using the data that was previously stored in the cellphone. Right now, we're using "xmlDoc.getElementsByTagName("peso")[0].childNodes[0].nodeValue" inside a HTML page to get the values from a xml. But i think the app isn't storing the data in this XML file, but on the internal data of the cellphone. How can i reach a value there and assign it to a variable?

    Thank you very much in advance!
    loyalIND likes this.
    12-25-13 02:47 PM
  2. diegonei's Avatar
    Brazilian devs? From Brasil?

    Code me some Fantastico app! Even better! Some CQC or Porta dos Fundos for BB10! Let's give the masses what they want!

    (Oh yeah, I asked the mods to come look at your thread!)

    And welcome to the forums!
    Lorenzo Saraiva likes this.
    12-25-13 08:46 PM
  3. pkcable's Avatar
    And I passed the thread on to my developer friends
    diegonei likes this.
    12-25-13 10:02 PM
  4. KermEd's Avatar
    Yeah, it could be storing it internally to a flat file or very likely in a cookie depending on what kind of data is being stored...

    Edit : thought u were using webworks. Snip.

    Without knowing a bit more - its hard to point you in the right direction for best practices. There are a plethora of questions. If it is a 3rd party app storing data in its own app folder - security is such that you cannot access it. Only the actual app can - but it may be able to be leveraged depending on how they set it up (invocation etc). If you are accessing the Web data inside your cascades instance, your Web instance will have its own storage and cookies - you can access some of that.

    Your first best step is to hit up the developer making your 3rd party app and ask where it is stored.

    As for reading/writing files - From a code perspective it will also depend on how the file is assembled (straight configuration file settings in text are much easier than binary for example). In a binary or text file, you will need to parse it out into formats... a simple approach is to simply import the entire file as a long set of strings broken by \n.

    A quick first step to checking for a file? In your app, in the Web view, open the url file://. Browse into your app folder and you can see what files are stored that are accessible to you. With a few file IO tweaks you can then copy those files out to media and disassemble them to find the entry points. From there on, you can just use simple file API's in cascades to parse out what you care about.

    http://developer.blackberry.com/nati...ileengine.html
    Last edited by KermEd; 12-25-13 at 11:21 PM.
    diegonei and Lorenzo Saraiva like this.
    12-25-13 10:36 PM
  5. Superfly_FR's Avatar
    Hi Lorenzo,
    For structuring and performance, I've been using the built-in SQLlite support in my Webworks testing. I presume it's also supported in the native branch, so you may want to have a look at it.


    For native see
    Data management - BlackBerry Native

    XML / cookie may be fine for a tiny amount of data, but I'd definitely use SQLite as soon as the data volume is bigger than 1Kb.

    Hope it helps,
    Cheers,
    SF
    diegonei and Lorenzo Saraiva like this.
    12-26-13 02:37 AM
  6. Lorenzo Saraiva's Avatar
    Thank you all for the help! I was away travelling and now will try the suggestions to see if I can solve my problem!
    Superfly_FR likes this.
    01-08-14 11:09 AM
  7. Superfly_FR's Avatar
    Thank you all for the help! I was away travelling and now will try the suggestions to see if I can solve my problem!
    Let us know !
    01-08-14 01:24 PM

Similar Threads

  1. Replies: 10
    Last Post: 05-05-14, 12:01 AM
  2. Newbie help.
    By frank-zappa in forum BlackBerry PlayBook
    Replies: 12
    Last Post: 12-30-13, 02:42 PM
  3. Help!!! 8 ball pool crashes
    By zaid-z10 in forum BlackBerry 10 OS
    Replies: 7
    Last Post: 12-30-13, 12:09 PM
  4. Need help downgrading... (Solved)
    By WindOfRage in forum BlackBerry 10 OS
    Replies: 5
    Last Post: 12-25-13, 07:47 PM
  5. Strange Problem with Sachesi
    By Benjamin_NYC in forum BlackBerry 10 OS
    Replies: 7
    Last Post: 12-25-13, 07:34 PM
LINK TO POST COPIED TO CLIPBOARD