Hello good people,
I have this example from erel , to take a screenshot using a java object.
How would I save it into the phone's gallery? or better, to a dedicated directory inside the gallery?
?
I have this example from erel , to take a screenshot using a java object.
B4X:
Sub TakeScreenshot As Bitmap
Dim jo As JavaObject
jo.InitializeContext
Dim decor As JavaObject = jo.RunMethodJO("getWindow", Null).RunMethod("getDecorView", Null)
Dim decorChild As JavaObject = decor.RunMethod("getChildAt", Array(0))
decorChild.RunMethod("setDrawingCacheEnabled", Array(True))
decorChild.RunMethod("buildDrawingCache", Null)
Dim bmp As Bitmap = decorChild.RunMethod("getDrawingCache", Array(True))
bmp.Initialize3(bmp)
decorChild.RunMethod("setDrawingCacheEnabled", Array(False))
Return bmp
End Sub
How would I save it into the phone's gallery? or better, to a dedicated directory inside the gallery?
?