Hi all.
I would like to capture the screen of my app as this:
Now if i combine with button ( Home + another button ) i have this result that you see up.
If i utilize this code:
i have this result:
Any idea ??
Thank you very much
Marco
I would like to capture the screen of my app as this:
Now if i combine with button ( Home + another button ) i have this result that you see up.
If i utilize this code:
B4X:
DateTime.DateFormat = "yyyyMMdd"
DateTime.TimeFormat = "HHMMSS"
Dim now As Long = DateTime.now
Dim filename As String = "BC_" & Starter.NumeroDDT &"_"& now & ".jpeg"
Dim Obj1, Obj2 As Reflector
Dim bmp As Bitmap
Dim c As Canvas
Obj1.target = Obj1.GetActivityBA
Obj1.target = Obj1.GetField("vg")
bmp.InitializeMutable(Activity.Width,Activity.Height)
c.Initialize2(bmp)
Dim args(1) As Object
Dim types(1) As String
Obj2.target = c
Obj2.target = Obj2.GetField("canvas")
args(0) = Obj2.target
types(0) = "android.graphics.Canvas"
Obj1.RunMethod4("draw", args, types)
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal , filename, False)
bmp.WriteToStream(out, 100, "JPEG")
out.Close
i have this result:
Any idea ??
Thank you very much
Marco