AutoWeb Import API from file

Discussion in 'AutoApps' started by autormali, Jul 6, 2017.

  1. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    I've created backup of my APIs. I would like to restore them from that file. Can't restore them now. Toasting that json is invalid. Here is a log:
    Errors - 2017-07-06 11:47:27.208 - Json error: com.google.gson.s: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Can you check the contents of the file? What's there?
     
  3. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    The file can be read by any Sqllite viewer on the phone as well as on the PC. I can see the database tables with APIs.
    I've reinstalled AutoWeb and tried to restore:
    - just imported and backuped random Api from Web Services
    - the last backup file (backup taken on week ago)
    - and some old backup file (from March this year)
    All above attempts to restore (different files) failed. With the same flash - invalid json. With the same log reading.
     
    Last edited: Jul 7, 2017
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,479
    Likes Received:
    806
    Hmm, do you mean you're trying to import the database file with all the APIs? That function is meant to import a single API from a JSON file that represents the API. Not an SQL database file. Hope this clarifies it.
     
  5. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    All clear. Thanks.
     
  6. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    Ok. All back up is saved to SQL database, not only for AutoWeb but for AutoShare, AutoLocation... Acctualy my previous phone is dead :( I would like to backup all data I saved for all AutoApps. How to do it if they are saved to SQL database and build in backup requires Json as input?
     
  7. autormali

    autormali Member

    Joined:
    Jul 4, 2016
    Messages:
    134
    Likes Received:
    22
    I managed restore backup databases by means of copying them to apps databases folder.
     

Share This Page