Android Question SignatureCapture.Save... Problem

ST500

Active Member
Licensed User
Hi guys,

I need your help. Why doesn't this command overwrite the picture?

SignatureCapture.Save(SD1, File.DirDefaultExternal & "/SQLite/Fuhrbericht", "Fahrer_" & baustelleneu.result & ".png")

Each time I can see the picture, that I saved first time.

Martin
 

Star-Dust

Expert
Licensed User
Try rhis:

B4X:
File.Delete(File.DirDefaultExternal & "/SQLite/Fuhrbericht", "Fahrer_" & baustelleneu.result & ".png")
SignatureCapture.Save(SD1, File.DirDefaultExternal & "/SQLite/Fuhrbericht", "Fahrer_" & baustelleneu.result & ".png")
OR
B4X:
Dim Out As OutputStream
'    Dim SD1 As Bitmap
'     I suppose SD1 is bitmap - If is Canvas use SD.bitmap
   
    Out=File.OpenOutput(File.DirDefaultExternal & "/SQLite/Fuhrbericht", "Fahrer_" & baustelleneu.result & ".png",False)
    SD1.WriteToStream(Out,"PNG")
 

Star-Dust

Expert
Licensed User
If Class Signature Capture by Erel... for second solution can use this

B4X:
Dim Out AsOutputStream 
Out=File.OpenOutput(File.DirDefaultExternal & "/SQLite/Fuhrbericht", "Fahrer_" & baustelleneu.result & ".png",False)
SD1.Canvas.Bitmap.WriteToStream(Out,"PNG")
 

ST500

Active Member
Licensed User
Star-Dus,

it makes me crazy. I can see the first picture, only. After deleting via code too. If I delete the picture manually it works.
 

Star-Dust

Expert
Licensed User
Probably why use File.DirDefaultExternal But it is not recommended.
Use File.DirRootExternal

When do I use the second method I suggested to you to make a error?
 

Star-Dust

Expert
Licensed User
;)
 
Top