Trying to adjust an old project

hi Found the block but they are out dated file scope and many changes. I have to upgrade them however here it goes in the atachment
I used filereplenish by Abraham Getzler and FusionTable Bulk insert... I have to re-block.

Needles to say that I am having trouble or dificulties with File file scope etc.

I am starting with small steps learning how to save a file for the aplication. but in order for my idea to work i need to be able to read a csv file outside the app, (maybe as scope share, so far i have been unsuccesful ) and then send the csv to Google Spread Sheets but this are bulk csv files ....

best Regards
Luis Matheu

Unfortunately it is not so easy anymore, because Google added some restrictions...

If that file was not created by your own app, then you have to use SAF to read non media files, see also Some basics on Android storage system

See also

Taifun
PS: for further questions please start your own thread

1 Like

I also remember that a script for a web app was done for this proyect, and was actually the script that did the" hand shake " to GSS here the script for the hand shake... so it was from the csv file sent to the web app, and from there to GGS (back in 2019 prior the pandemic and all issues

Wonder if with the new file restrictions this pathway still viable, fusion table not working !!!!

I have to reblock nice to keep learning but please KISS....as skunk works use to preach

Function doGet(e) { 
  var ss = SpreadsheetApp.openByUrl(" https://docs.google.com/spreadsheets YOUR GGS     #gid=0 "); // your GSS direction here
  var sheet = ss.getSheetByName("Sheet1");  // check your page name 
  
  uploadData(e,sheet);
}

function doPost(e) { 
  var ss = SpreadsheetApp.openByUrl(" https://docs.google.com/spreadsheets YOUR GGS HTTP ");
  var sheet = ss.getSheetByName("Sheet1"); 
  
  uploadData(e,sheet);
}


function uploadData(e,sheet) {  //YOUR LIST OF VARIABLES 
  
  var codinvs = eval("[" + e.parameters.codinvs + "]") ; 
  var imeis = eval("[" + e.parameters.imeis + "]") ;
  ;
  
  
  for (var i=0;i<codinvs.length;i++) {
   var codinv = codinvs[i];
   var imei = imeis[i];
  
   
   sheet.appendRow([codinv,imei,......]);
  }

}

OK I can store inside the app with scope app. The first buttons allow saving a csv file inside the app, secon button call file inside the app, and writes the value on the designated lable. all is good

Gets really frustrating. when trying outside the app tried Legacy, shared all scopes and combinations of thereof

What is the extension for storing a csv file with the click of a button?
and with the click of another button get it in to a lable.
When manually inspect for the file on my cellphone its there (even though the otifier says Error2104) but can not read from it an place it in the lable. I just was away 2 years , and all changed... need to learn more on SAF Storage Acces Framework

!
Imagen1

Use file scope Legacy and for your tests make sure, the file /Documents/oportunidad.csv not already exists before trying to store

Use the file component and its SaveFile method, no extension needed

Again use the file component and its ReadFrom method

See also Storage

Important is, who is the owner of the file. If it is not your app, you have to use SAF as already mentioned

Are you planning to publish your app in Google Play? If not you can follow the tutorial here and avoid using SAF

Taifun

Hi Taifun
Hope I can explain the current proyect is in order to learn skill that i may need to up date the old proyects.

2 buttons at the top are for making and reading a csv file within the app file stored inside the app (scope app) and display lable the number 35

2 more buttons are set to make a csv file not in the app but at a location . Button "Escribe archivo compartido en Documents " stores a number 40 the the fuscia button should read and display the number 40. (in the companion I have ben able to make it work, but not in real app). The file is being store as picture show in the folder documents. but i can not read the file and display on the lable.

The proyects I need to uptade use to call file oportunidad and every time you use it it will substract 1, so you can use it for few more times, then a pasword is needed to reload the usage. thata aplication used to make a csv file name locations (list of color names, dates , time , latitude and longitud) file could contain 100 s of lines. I files pile up by the user then data was appended,
Then with the use of a different app, the locations.csv file was sent using the fileReplenish extension to a web app that then redirect to GGS . This app uses one of your extensiones to veryfy wifi conection. once the file was sent it was deleted form the cellphone, until a new file was made by the other app.

No I am not publishin in Google play------thanks for the turorial i will bite into it but as Anke mentioned some of us will lose a tooth. thanks again LuisMa