anonymous Log in
Search
Recents:
v3.0
sd
Residual data in an offline app
09/03/21 13:27

nicola

Replies: 7

Hello, I have an offline app that need to take photos and send them to the database. I select a "job", sincronyze the photo of the job on the device, than I open a panel to take the photos. It's working as I want, the photos on the server database are downoaded only when the correct job is selected.
My problem is that there are datas that stay on the device as data app despite the "job" is not selected, as the app is not correctly filtered. Also trying eset the offline database, these datas are not deleted. What could it be the reason? Maybe when I take a photo, this is not correctly cleared?
Nicola Pilli
Sviluppo Software
[virgola25 Midi]
[Descrizione: Descrizione: RTS 1989 Mail]
E nicola@rtsnet.it<mailto:nicola@rtsnet.it>
T 0758010260
F 0758011789
W www.rtsnet.eu<http://www.rtsnet.eu>
==================================================================================
Per favore pensa all'ambiente prima di stampare questa mail (o altro documento)
Please consider the environment before printing this mail (or this document)
==================================================================================
Le informazioni contenute in questa comunicazione e negli allegati sono riservate; è vietato a soggetti diversi dall'effettivo destinatario qualsiasi uso, copia, diffusione di quanto in essi contenuto, sia ai sensi dell'articolo 616 c.p., sia ai sensi e per gli effetti del T.U. sulla privacy (D.lgs 196/2003). Qualora il presente messaggio Vi fosse pervenuto per errore, dovrete provvedere alla sua immediata cancellazione dandocene notizia via e-mail all'indirizzo del mittente o all'indirizzo info@rtsnet.it<mailto:info@angelantoni.it>
This e-mail and any attachment(s) are strictly confidential. This message must not be copied, disclosed or used by anybody other than the intended recipient(s). If you are not the intended recipient(s), please inform the sender by e-mail or send a message to info@rtsnet.it<mailto:info@angelantoni.it> and destroy this message immediately
Replies

mcrispino

10/03/21 10:50
Nicola: I'm not sure that I fully understood your problem... but pictures taken via the Camera API are not automatically deleted. If you don't want them in the device, you have to remove them manually. If you can give us some more information, maybe we can give you a more detailed answer. What GeneXus version are you using? What platform: Android, iOS or both? How are you taking the pictures? Also if you could provide a sample to reproduce the problem, it would be great. Regards. *Marcos Crispino* Research & Development | GeneXus +598 2601 2082 | Simplifying Software Development [image: GeneXus] On Tue, Mar 9, 2021 at 5:00 PM Nicola Pilli

nicola

10/03/21 11:12
My project is done with genexus 16U4 (then converted to 16U11), only Android. The panel I use to take the photos has a grid with an (editable) image variable. My Event load is this Event Load composite load load load load load load load load load load Endcomposite Endevent So as soon I open the panel I have a number of rows to click to select or take a photo. Then, with an event, I save every photo of my grid For Each Line in Grid1 SalvaInterventi(&mode,&ElementoId,&ElementoNomeFoto,&GrigliaFoto,&ElementoGPS,&ElementoNote,&ElementoIntervento,&ElementoData,&ElementoOra) Endfor Where &GrigliaFoto is my image variable I think that in this panel the photos I take stay memorized in the app and they are slowly piling up and the app grows and grows in size. Probably my solution is not the best, but I can’t find a way to avoid this growing or to delete these extra datas Nicola Pilli Sviluppo Software [virgola25 Midi] [Descrizione: Descrizione: RTS 1989 Mail] E nicola@rtsnet.it T 0758010260 F 0758011789 W www.rtsnet.eu ================================================================================== Per favore pensa all'ambiente prima di stampare questa mail (o altro documento) Please consider the environment before printing this mail (or this document) ================================================================================== Le informazioni contenute in questa comunicazione e negli allegati sono riservate; è vietato a soggetti diversi dall'effettivo destinatario qualsiasi uso, copia, diffusione di quanto in essi contenuto, sia ai sensi dell'articolo 616 c.p., sia ai sensi e per gli effetti del T.U. sulla privacy (D.lgs 196/2003). Qualora il presente messaggio Vi fosse pervenuto per errore, dovrete provvedere alla sua immediata cancellazione dandocene notizia via e-mail all'indirizzo del mittente o all'indirizzo info@rtsnet.it This e-mail and any attachment(s) are strictly confidential. This message must not be copied, disclosed or used by anybody other than the intended recipient(s). If you are not the intended recipient(s), please inform the sender by e-mail or send a message to info@rtsnet.it and destroy this message immediately Da: Marcos Crispino Inviato: mercoledì 10 marzo 2021 14:51 A: sd@gxtech.com.uy Oggetto: Re: [sd] Residual data in an offline app Nicola: I'm not sure that I fully understood your problem... but pictures taken via the Camera API are not automatically deleted. If you don't want them in the device, you have to remove them manually. If you can give us some more information, maybe we can give you a more detailed answer. What GeneXus version are you using? What platform: Android, iOS or both? How are you taking the pictures? Also if you could provide a sample to reproduce the problem, it would be great. Regards. Marcos Crispino Research & Development | GeneXus +598 2601 2082 | Simplifying Software Development [Immagine rimossa dal mittente.] [Immagine rimossa dal mittente. GeneXus] On Tue, Mar 9, 2021 at 5:00 PM Nicola Pilli >

mcrispino

10/03/21 12:21
That Load event sure looks weird... but I guess it works as you intended. If you don't need the image files after sending them to the server, you can always delete them afterwards. You can add another "for each line in Grid1"(*) that finds the images' paths, and then removes them. Something like this (coding out of my mind, please make sure it is correct...): for each line in Grid1 &blob = &GrigliaFoto &path = &blob &file.source = &path if &file.exists() &file.delete() endif endfor Where: &blob is a Blob, &path is a Varchar, and &file is a File. (*) Note that this solution only works in GeneXus 16 Upgrade 8 or above. Take a look at SAC #46839 for details. On Wed, Mar 10, 2021 at 11:12 AM Nicola Pilli

nicola

12/03/21 13:51
I think this could be the reason, but I can’t find how to delete the image. Your code has the problem that path is varchar and blob is a blob so I can’t assign it. I tried with &blob.imageUri but I can’t use this command on a device, I can’t find a way to find the path of my photo to delete it I tried this also for each line in Grid1 &GrigliaFoto.SetEmpty() endfor but it doesn’t work anyway Nicola Pilli Sviluppo Software [virgola25 Midi] [Descrizione: Descrizione: RTS 1989 Mail] E nicola@rtsnet.it T 0758010260 F 0758011789 W www.rtsnet.eu ================================================================================== Per favore pensa all'ambiente prima di stampare questa mail (o altro documento) Please consider the environment before printing this mail (or this document) ================================================================================== Le informazioni contenute in questa comunicazione e negli allegati sono riservate; è vietato a soggetti diversi dall'effettivo destinatario qualsiasi uso, copia, diffusione di quanto in essi contenuto, sia ai sensi dell'articolo 616 c.p., sia ai sensi e per gli effetti del T.U. sulla privacy (D.lgs 196/2003). Qualora il presente messaggio Vi fosse pervenuto per errore, dovrete provvedere alla sua immediata cancellazione dandocene notizia via e-mail all'indirizzo del mittente o all'indirizzo info@rtsnet.it This e-mail and any attachment(s) are strictly confidential. This message must not be copied, disclosed or used by anybody other than the intended recipient(s). If you are not the intended recipient(s), please inform the sender by e-mail or send a message to info@rtsnet.it and destroy this message immediately Da: Marcos Crispino Inviato: mercoledì 10 marzo 2021 16:21 A: sd@gxtech.com.uy Oggetto: Re: [sd] Residual data in an offline app That Load event sure looks weird... but I guess it works as you intended. If you don't need the image files after sending them to the server, you can always delete them afterwards. You can add another "for each line in Grid1"(*) that finds the images' paths, and then removes them. Something like this (coding out of my mind, please make sure it is correct...): for each line in Grid1 &blob = &GrigliaFoto &path = &blob &file.source = &path if &file.exists() &file.delete() endif endfor Where: &blob is a Blob, &path is a Varchar, and &file is a File. (*) Note that this solution only works in GeneXus 16 Upgrade 8 or above. Take a look at SAC #46839 for details. On Wed, Mar 10, 2021 at 11:12 AM Nicola Pilli >

rdg.ruben

12/03/21 17:08
I ran into this problem, what I did was in the start event create other auxiliary variables and I leave it with &varaux1.SetEmpty() and in the events where I need it I do the assignment of &Variable = &varaux1 *L**ic. Ruben Dario Gonzalez* Desarrollo *Movil*: +595 971 333040 *E-mail*: rdg.ruben@gmail.com El vie, 12 mar 2021 a las 14:26, Nicola Pilli ()

mcrispino

18/03/21 15:28
Nicola, sorry for the delay. I just made a sample Panel in GeneXus 17 Upgrade 3 preview, and it works as I told you in the previous email, both in Android and iOS. I'm attaching an XPZ file with the sample Panel. This is the Panel's code: Event Load Load Load Load Endevent Event 'ShowImagePaths' composite for each line in Grid1 &blob = &image &path = &blob msg(&path) endfor endcomposite Endevent Event 'PickImage' &image = PhotoLibrary.ChooseImage() Endevent In this case you can also assign &image.ImageURI to the &path variable instead of using a &blob variable, but I'm not sure it will always work... That is, the 'ShowImagePaths' could look like this: Event 'ShowImagePaths' composite for each line in Grid1 &path = &image.ImageURI msg(&path) endfor endcomposite Endevent Hope it helps. On Fri, Mar 12, 2021 at 2:26 PM Nicola Pilli

nicola

18/03/21 15:31
Thanks, I'll check as soon as possible! Scarica Outlook per Android ________________________________


Back to sd