Hi gyz i present you my another powerful app for custom data loading on user scroll(concept of RecyclerView) from Airtable, Firebase and mysql under jugard series project 6
Note
- i did not focus on code optimization so that everyone can understand it easily
- I’ll keep on updating the guide for more convenience and try to make it easily understandable
methods and extensions used
I used
Mysql snippet and php file by @Taifun
Dynamic components extension by @yusufcihan
Vertical Scroll handler extension by @ColinTree
Async image loading extension by @DevYB
Explanantion
Offline List
the whole concept of ofline list is very simple and i already have written a complete guide on this topic u can read it from the following link
Load Data from Firebase
Details
*Call all the tags
*save it in a variable
*then run a for loop with limit of your required data i.e 5
* when got value then create the list fior 5 items
*When reach bottom then
*now set limit again to 5 but starting point of loop should be 5+1=6
*Repeat the process
Blocks
MySQL
Details
*Run a query to get number of rows
*Run A queru with a Limit say starts from 0 and get data for 5 rows (SQL allows
us to get data with a specific limit)
*save it in a variable
*then run a for loop with limit of your required data i.e 5
* when got value then create the list for 5 items
*When reach bottom then
*now set limit again starts frm 5 and again get data for 5 rows
(see sql Limit queries)
*Repeat the process
Blocks
Airtable
Details
in airtable u cannot directly found the number of total records
there are two ways
*LookUp Method
*Use a cell for saving total record numbers
LookUp method is official method suggested by airtable but it requires some calculations that will confuse users , so here we will discuss only use cell method
but if you want to impliment lookup method then u can check it here How to use look up method
Cell method
this is a jugard method …
create another table within the same base that contain only one coulmn and one row mean there should be only one cell
now when u create your first table for the first time then also add total number of records in second table’s cell
for example if your main table has 25 rows then put 25 in second table’s cell manually
now when u made any post after that from admin app or if a user posts then when the post is updated in ,main table then run a query to get value of cell from second table for example
if the vaule in second table’s cell is 25 then update it by adding 1 to 25 mean 25+1=26 in app and then update the value to 26 second table’s cell and repeat it every time a user posts by using increment logic in your app
Note u can also do it without creating a seperate table and for example
if in your main table u 5 columns add a 6th column and set value of total records in its first cell
but it is also confusing for some users so simply create a new table…as i mentioned above
or either use lookup method
now instructions for getting data
*get cell value from second table
*save it in a variable
*then run a for loop with limit of your required data i.e 5 and get 5 rows from fist
table
* when got value then create the list for 5 items then
*When reach bottom then
*now set now call next 5 rows
*Repeat the process
Blocks
advantages
With this u can load data in parts mean if you want load items 4 by 4… 5 by 5 even any custom form can be obtained
Now u can develop apps with loading data systems very similar to facebook, YouTube etc
beta Tester
This aia is tested by our senior koder @Rogerio_Rios and @Alapjeet
demo video
U can watch live video here
Its realy a customizable data loading u can load data from database one by one or in any custom forms
note
I made it highly user friendly and even newbies can understand logics very easily
Because i didn’t focus on code optimization i tried my best to made it more understandable
Downloads
CustonLoading.apk
CustonLoading (3).aia (364.2 KB)
Credits
Thanks to @kodular for such a great platform
thanks to @yusufcihan @DevYB and @ColinTree for their extensions
Thanks to @Taifun for his mysql tutorial
Thanks to @Rogerio_Rios for his help during the project
Thanks to @msr79526 for giving me idea for this project
Feel Free to ask queries and your questions