×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Where do I save data from a Nokia application?

    I am developing a Nokia application that saves a pair of data - an integer and a date. The application will save thousands of such pairs of data. The data may also be exported as CSV.

    What is the best practise for such a scenario?
    Do I save it to particular drive on the mobile?
    Can I use a resource (qrc) file for this purpose?

    Can amount of details will be greatly appreciated. Thanks.

  2. #2
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Where do I save data from a Nokia application?

    if the amount of data is very big and its accessing is very high, then you can prefer Database,
    and for creating the DB, look on that,
    http://wiki.forum.nokia.com/index.ph...database_in_Qt
    Regards
    $-Nitesh-$

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Re: Where do I save data from a Nokia application?

    Thanks for your reply.
    I was thinking of saving to a file because only one pair will be saved once/twice every day. Then all the data may be used to generate a graph (once or couple of times a day).

    Do you think saving to a file would suffice?
    Will using a database make the application faster?

    Please advice. Thanks.
    Last edited by ShahriarNK; 2010-12-24 at 08:29.

  4. #4
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Where do I save data from a Nokia application?

    Will using a database make the application faster?
    yes in that case,it would be good to use DB.
    Regards
    $-Nitesh-$

  5. #5
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Re: Where do I save data from a Nokia application?

    Thanks Nitesh, just some followup questions...

    Do you think the use of a database would make the application too large in size (and it would become difficult to download)?
    Also, would it requre the installation of additional software in the user's mobile device?
    And would be possible to export the data as CSV from the database?

    Your help is very much appreciated!
    Last edited by ShahriarNK; 2010-12-24 at 08:33.

  6. #6
    Super Contributor
    Join Date
    Jan 2008
    Location
    Bangalore, India
    Posts
    777

    Re: Where do I save data from a Nokia application?

    Do you think the use of a database would make the application too large in size (and it would become difficult to download)?
    in your case, the DB will be created and it will use also after installation of your application.so at the time of downloading it wouldn't be any effect on size of application.
    Also, would it requre the installation of additional software in the user's mobile device?
    no additional s/w will be required.
    Regards
    $-Nitesh-$

  7. #7
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Where do I save data from a Nokia application?

    You can certainly write to a plain old file, if that suits your needs. It would be faster than using a DB, and take up less space.

    Generally, unless you want to share the data with other applications on the phone, you should place it in the "private" directory of the application. You do this by simply opening a file with no directory root specified -- the app starts out with "cd" set to this directory.

    If you want to share the data with other applications, or make it accessible via the USB, you should place it in C:/Data/your-app-directory on Symbian -- not sure about Maemo.

    You can't write to a resource file.

  8. #8
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: Where do I save data from a Nokia application?

    If it's just local data, and really low volume (i.e. not more than a few hundred pairs) the easiest way is putting it a QSettings - that automatically takes care about directories, drives, etc

  9. #9
    Registered User
    Join Date
    Nov 2010
    Posts
    40

    Re: Where do I save data from a Nokia application?

    Quote Originally Posted by danhicksbyron View Post
    Generally, unless you want to share the data with other applications on the phone, you should place it in the "private" directory of the application. You do this by simply opening a file with no directory root specified -- the app starts out with "cd" set to this directory.
    Thanks very much for the info Dan.
    I have one follow-up query: my application will save the data to a file as well as read from it. So, if I open a file with no root specified, how do I find/locate the file when I want to read from it?

    Thanks again.

  10. #10
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,569

    Re: Where do I save data from a Nokia application?

    When you create a file without specifying a path and write to it, logic dictates that if you use the same name to open it later for reading, it will be located from the same default directory. I.e., you don't really need to find/locate it yourself.

  11. #11
    Nokia Developer Moderator
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    327

    Re: Where do I save data from a Nokia application?

    Quote Originally Posted by petrib View Post
    When you create a file without specifying a path and write to it, logic dictates that if you use the same name to open it later for reading, it will be located from the same default directory. I.e., you don't really need to find/locate it yourself.
    That's generally true for absolute paths, relative paths are... relative (so not as reliable as your working directory might change). Some platforms might also have their limitations of their own that might show as 'missing' files (for example under Maemo/MeeGo your file will not be available if it was in MyDocs and the device is connected to a PC in mass storage mode).

  12. #12
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: Where do I save data from a Nokia application?

    Yeah, it would have helped if the OP had revealed what platform he's running on.

Similar Threads

  1. how to save data in data query dialog
    By karan kumar in forum Symbian
    Replies: 4
    Last Post: 2010-06-08, 12:07
  2. how to save data in data query dialog
    By manishpinjani in forum Symbian
    Replies: 5
    Last Post: 2010-06-04, 07:56
  3. Replies: 7
    Last Post: 2009-06-12, 09:14
  4. Save data on Nokia 7650
    By BigBozMan in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-06-18, 10:56
  5. How can i save data
    By tj_bautista in forum Mobile Java General
    Replies: 2
    Last Post: 2003-06-18, 09:33

Posting Permissions

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