Colintree Custom listview extension update one element

what do your mean ? “you can test if items are already there”

until now the elements were always the difficulty is to realize the update as quickly as possible

hi tim

I made the changes as proposed and indeed the update is done without flickering faster (I only have 10 items but this is good news)

on the other hand as I said above I installed the same application on another device and the information has changed places so that I no longer have the photos and the rest no longer have very meaning strange but it will be for tomorrow after a few hours of sleep
if anyone has an idea about what can cause this …



hi the error undoubtedly comes from the format of data which I recover from firebase:
{member = king arthur, pic = https: // firebasestorage …, presence = no, job = trader}
and I fix it all with a few lines of text manipulation put it is not json,
so …
I still have some efforts to make


I try to use that script witch allows to retrieve data from firebase but it’s not Jason
function myFunction() {
var baseUrl = “”;
var secret = “HKl8dIAFbxpYAppL2gEfSuO5kGNxsoAfVchOgVr”;
var database = FirebaseApp.getDatabaseByUrl(baseUrl,secret);



I see you have asked about this on Kodular forum as well!

You need to show:

  • How you are uploading data to firebase
  • A screenshot of the data on firebase

I am guessing it is about the format of the data you upload that is causing the problem when you get data back.

please first decide, which builder you like to use and then ask only in the corresponding community!
thank you.


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.


My first steps with App Inventor so …

To import data to Firebase i use this script :

`function writeDataToFirebase() {

var ss = SpreadsheetApp.openByUrl(“”);

var sheet = ss.getSheetByName(“membres”);

var data = sheet.getRange(2,2,sheet.getLastRow(),sheet.getLastColumn()).getValues();


var dataToImport ={};


for(var i = 0; i < data.length-1; i++) {
dataToImport[cle] = {

var firebaseUrl = “”;
var base = FirebaseApp.getDatabaseByUrl(firebaseUrl);

and the data in the Firebase console

and in the Firebase got value block, data are this way :

{member = king arthur, pic = https: // firebasestorage …, presence = no, job = trader}

We have seen this issue before when developers have imported data from a google sheet. For some reason it doesn’t escape ( \ " ) the ", causing problems when you import the data to AI2

This is what things should look like on firebase:


Other than calling down the data from the google sheet into AI2 and then uploading to Firebase, I can’t offer another solution, but will have a look around later to see what I can find


for now I will use your proposal as I do not need to modify the database often I will create an application only to export the data to firebase with App Inventor while waiting for better


I have figured it out, just needs a different syntax to generate the dataToImport:

Like so:

In sheet:


in script:

dataToImport[name] = '["'+[data[i][0] + '","' + data[i][1]+'","'+data[i][2]]+'"]' ;

which produces in firebase:

Dave: "[\"Dave\",\"2\",\"blue\"]"
Jane: "[\"Jane\",\"4\",\"yellow\"]"
John: "[\"John\",\"1\",\"red\"]"
Sue: "[\"Sue\",\"3\",\"green\"]"

In Ai2 with project bucket set to fbtest you can Call the tag "Dave" and you get back a list


which you can then work with


Here is my script:

function writeDataToFirebase2() {
  var ss = SpreadsheetApp.getActive();
  var sheet = ss.getSheets()[0];
  var data = sheet.getDataRange().getValues();
  var dataToImport = {};
  for(var i = 1; i < data.length; i++) {
  var name = data[i][0];
  dataToImport[name] = '["'+[data[i][0] + '","' + data[i][1]+'","'+data[i][2]]+'"]' ;
  var firebaseUrl = "";
  var base = FirebaseApp.getDatabaseByUrl(firebaseUrl);
  base.setData("fbtest", dataToImport);

For readers/tryers: to get this to work, you have to add a library to your google apps script project. Best to follow THIS, get it working then modify to suit.


and before anybody asks, this is how you write the script if you want to make a list of lists, and have all the data in the same tag: (uses same data as above)

function writeDataToFirebase3() {
  var ss = SpreadsheetApp.getActive();
  var sheet = ss.getSheets()[0];
  var data = sheet.getDataRange().getValues();
  var dataToImport = {};
  var lolData = [];
  for(var i = 1; i < data.length; i++) {
    lolData.push('["'+[data[i][0] + '","' + data[i][1]+'","'+data[i][2]]+'"]') ;
  dataToImport = '['+lolData+']';
  var firebaseUrl = "";
  var base = FirebaseApp.getDatabaseByUrl(firebaseUrl);
  base.setData("fbtest/myList", dataToImport);

hi TimAI2

it works !!!

the work that you done risk going unnoticed behind the title “Colintree Custom Listview extension update one element”

in any case a big thank you


sir what should be the block so that whenever i set the tag the values from firebase will be a list..i want to know blocks

Please provide an example of what you mean

i want do this..that means the project bucket will be Dave and it contains the data same as you..

but my firebase project is like below image

Set the project bucket to deep
Return all the keys/values as a json
Convert the json to an AI2 list

it is in your firebase

how to do it sir?

You appear to be asking the same question in another topic.....

yes sir, i have forgotten that i asked that question.. as i have been reading for last 4 hours to find the solution