×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    4

    Question How to make an App with a DB or some sort of pre stored data?

    I'm making an Asha App using the Web Tools (Eclipse), I need to store about 1,000 sentences in this App that will be loaded individually when selected so I need to select the appropriate one somehow.

    On Android I use SQLite DB, what would be the appropriate technique here? I want them to be on the device and not require a network connection.

    Thanks.

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to make an App with a DB or some sort of pre stored data?

    Hello and welcome to discussion board!

    Well you can safely put those onto some server, as web apps always requires network connection.
    All of the app logic in Web Apps (namely JavaScript code) is executed on a proxy server.

    It is not possible to make web app, that would work without any network connection.

    Br,
    Ilkka

  3. #3
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,800

    Re: How to make an App with a DB or some sort of pre stored data?

    Just to add, you can also save these on the proxy server using widget.preferences. This way you wouldn't require to implement your own server.

    You can read how to use the widget.preferences here: http://www.developer.nokia.com/Commu...es_40_Web_Apps

    Just a headsup, you can just store 500 such preferences, each of which can be 256 characters long.
    Pankaj Nathani
    www.croozeus.com

  4. #4
    Registered User
    Join Date
    Mar 2013
    Posts
    4

    Re: How to make an App with a DB or some sort of pre stored data?

    Quote Originally Posted by isalento View Post
    Hello and welcome to discussion board!

    Well you can safely put those onto some server, as web apps always requires network connection.
    All of the app logic in Web Apps (namely JavaScript code) is executed on a proxy server.

    It is not possible to make web app, that would work without any network connection.

    Br,
    Ilkka
    Really? The web apps require internet connectivity all the time? I thought they were like installable apps written in html/css/js, sort of like PhoneGap on Android/iPhone. If that's the case I guess I need to look at the Java path.
    Thanks.

  5. #5
    Registered User
    Join Date
    Mar 2013
    Location
    United Kingdom
    Posts
    161

    Re: How to make an App with a DB or some sort of pre stored data?

    While you do need to have an internet connection to run a Nokia Web App, I can see why you might need to store some data locally.

    You can actually do what you're looking to do by storing data in your Javascript as an object file like so.

    function getUsernameData() {
    var myFirstJSON = { "firstName" : "John",
    "lastName" : "Doe",
    "age" : 23 };
    return myFirstJSON;
    }

    You can then access that in your code by doing the following.

    console.log(myFirstJSON.firstName); // Outputs John
    console.log(myFirstJSON.lastName); // Outputs Doe
    console.log(myFirstJSON.age); // Outputs 23

    You can then of course embed the data in your HTML page with something like this.

    document.getElementById("firstName").innerHTML = myFirstJSON.firstName;

    Hope that might be of use to you, or someone else who is facing the same problem.

Similar Threads

  1. Where's the theme data stored ?
    By nokia_e70 in forum Symbian User Interface
    Replies: 2
    Last Post: 2008-04-10, 07:31
  2. Sending data via OBEX: Transferring works, but no data is stored.
    By Pijus_Magnificus in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-03-14, 11:14
  3. src: Using LinkedList to store/sort/filter/display data as List
    By akokchai in forum Mobile Java General
    Replies: 0
    Last Post: 2006-04-04, 09:37
  4. Inserting data in data base, stored in variables
    By miriamgs in forum Symbian User Interface
    Replies: 0
    Last Post: 2003-10-03, 14:31
  5. Replies: 2
    Last Post: 2002-05-13, 08:02

Posting Permissions

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