1. Download our Official Android App: Forums for Android!

Apps How can I import/export data and incorporate in real time with my app?

Discussion in 'Android Development' started by M0dSe7en, Sep 10, 2016.

  1. M0dSe7en

    M0dSe7en Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Sep 10, 2016

    Sep 10, 2016
    1
    0
    5
    I'm in the process of developing an app for the first time and I'm unsure of how to move data to a secure location, update it periodically and import it while the app is live so that the clients can receive it in real time.

    I'm thinking I would need to incorporate SQL, but I don't know how to create objects dynamically as the app is running for each respective row in a table.

    The app will involve posting, so naturally some might be removed by the admin or the user, so the post ID's will shift over time. Also, since the post count is constantly changing, I would need the amount of objects generated to be fluid.

    So I need to find a way to store the post data, and keep the data the same for both the database and whatever variables/objects are running in java. However, if I have to constantly query the database I feel like that would be very sloppy and slow.

    If anyone could link me to an article or a simple answer on how to accomplish this I would be very grateful.

    Thanks for your time.
     

    Advertisement

  2. LV426

    LV426 I say we take off and nuke this place from orbit
    Moderator
    Rank:
     #11
    Points:
    1,988
    Posts:
    7,876
    Joined:
    Oct 16, 2015

    Oct 16, 2015
    7,876
    11,508
    1,988
    Male
    Software developer
    South West of England
    If you want to maintain data centrally, and make it available to a client app, then the only practical way to do this is to have the app periodically query the server to request updates.
    There's a tutorial here on how to do this, by implementing a PHP based server, accessing a database.

    http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/

    Now what you do with the data once your app has it is up to you. You could persist the data in a local database, but then you have the problem of keeping this in sync with the server. But if you had a local database, then the app could function even if there was no Internet access. Depends on the app requirements really.
     
    M0dSe7en likes this.

Share This Page

Loading...