How to sync offline data?

but its not possible when internet is turned off

He has to add questions in label text. He can store user entry when internet connect with firebase DB component.

In this case you might want to use background task extension, so you can synced data and send to your database once the app detected an internet connection.

U can store data in
*Tiny db
*Dictionary
*Sql lite
And use web component to check whether the user is connected to internet
If true then call your data and save it in respected columns in your database

Its not a difficult task just require some logics and u will be done

2 Likes

Hmmm… How?

take a look at

https://community.kodular.io/t/simple-use-of-dictionary-and-tinydb/66132

1 Like

:joy::joy: I just get it from your guidse… As previously i didn’t use dictionaries :joy: and from your templates i get to know its method of storing data is very simmlar to sql lite

1 Like

That’s actually my own guide :joy: I thought @Zia_Choudhary said only using the dictionary

1 Like

:joy: :sweat_smile:

1 Like

@WatermelonIce
I can do it but I don’t have the time :pensive:

Instead of Airtable, you can integrate Google Forms to Google Sheets. If user is offline, save the url in a list in TinyDB when submit button is pressed, then create a procedure to send those to Google Sheet when it’s back online.

is there any way we can sync sqlite database with mysql?

Please elaborate it more what actually u want to do
?

1 Like

You have to organize your idea … :+1:t2:

When do you want to activate data exchange between databases ? Check for duplicity … Insert online database… Clean the local database ?

1 Like

i tried working with mysql database using @Taifun mysql tutorial and it was wonderful. What i am facing problem with is.
I need to upload almost 100 entries a day all within an hour or less.
So it will be difficult to send data to online server for every entry.
If there is any way we can save the data in any offline database and can sync it with online database when we wish to (or when we provide the data connection to app).

Local database Sqllite wirh tour database MySQL. Maybe using component network.

1 Like

@Rogerio_Rios not finding a way/ process to send data from sqlite to mysql from kodular or any app inventor fork. Searched a lot online but no outcome. Any way or tutorial u can suggets?

Its not like that when network connection is open
The data gets automatically sync… No it can’t.
U have to set queries
And probably u may need to set a loop
That can get data one by one and start saving in mysql… So its not easy as u r thinking
I advice u to directly upload it to mysql bcz its not a long process it may take just a few seconds depending upon your network

Use web component as advised by @Rogerio_Rios and then set your procedures /queries to achieve this

1 Like

100 entries per day? Little. All connected? So there is no need to create this offline routine.

As @Zia_Choudhary said, it is not a small job. Check if you have a connection to see if you record online or offline If it is recording offline, take the relevant data (if the offline database is deleted at the end of the routine we will not need filtering to upload the data) and have it inserted in the online database … and some more treatments in the routine.

1 Like

A note: these software are converters. They transform one type of database into another. I have one that I developed that turns DBF (type of tables) into MySQL. In this case above, we need to take the data from the database offline to the other database (online).

Converter DBF to MySQL

Edit
In addition to creating another database with the same structure as the original, I also take the data (converters do that).

1 Like