Recent

Author Topic: Name of the picture APPCameraDemo for delete  (Read 526 times)

juank1971

  • Jr. Member
  • **
  • Posts: 78
Name of the picture APPCameraDemo for delete
« on: September 27, 2020, 11:48:36 pm »
I would like to know how I can delete a photo after being shot by the camera in the example AppCameraDemo.

 the procedure jcamera1.FullPathToBitmapFile returns the path /storage/emulated/0/DCIM/photo1.jpg and I can't delete it because the real name is saved in the DCIM folder is 20200927_174507.jpg

juank1971

  • Jr. Member
  • **
  • Posts: 78
Re: Name of the picture APPCameraDemo for delete
« Reply #1 on: September 28, 2020, 12:33:55 am »
really  the file photo1.jpg is created in the DCIM folder

but another file with the same photo is also created in DCIM / CAMERA with another name 20200927_4565.jpg

And i need delete all




juank1971

  • Jr. Member
  • **
  • Posts: 78
Re: Name of the picture APPCameraDemo for delete
« Reply #2 on: September 28, 2020, 01:25:21 am »
or is it possible not to save the photo on disk, only save it in memory and I save it to the database on the rest server ???

jmpessoa

  • Hero Member
  • *****
  • Posts: 1662
Re: Name of the picture APPCameraDemo for delete
« Reply #3 on: October 02, 2020, 07:42:26 pm »
Quote
And i need delete all

Ok. I will try some solution...

Quote
only save it in memory and I save it to the database on the rest server ...

You can try convert the image  to base64 using jBitmap  and send it to the server....

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

juank1971

  • Jr. Member
  • **
  • Posts: 78
Re: Name of the picture APPCameraDemo for delete
« Reply #4 on: October 03, 2020, 04:24:33 pm »
Thanks yes i convert the image to base64 and send to the server

this worked fine the problem is the photo in the phone
When i take the picture the component camera save the picture to disck

I need control the photos for delete

I deleted the picture of the jcamera1.FullPathToBitmapFile.
Fine bat the camera save other picture in dcim folther with another name
« Last Edit: October 03, 2020, 04:26:45 pm by juank1971 »

jmpessoa

  • Hero Member
  • *****
  • Posts: 1662
Re: Name of the picture APPCameraDemo for delete
« Reply #5 on: October 04, 2020, 07:03:11 am »


Quote
but another file with the same photo is also created in DCIM / CAMERA ...

[warning: just an attempt!]

Please,  go to "Controls.java" in LAMW folder "....\android_wizard\smartdesigner\java"

and  try comment the line  2961

//galleryAddPic(newfile);

so, maybe you can prevent two saved images...



Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

juank1971

  • Jr. Member
  • **
  • Posts: 78
Re: Name of the picture APPCameraDemo for delete
« Reply #6 on: October 04, 2020, 12:51:29 pm »
you are the best in this you know the heart of java and the heart of pascal thank you very much I will bring you later I will tell you

 

TinyPortal © 2005-2018