Hi, I followed the Erel´s tutorial:
Google Maps Android v2 tutorial
And the map shows on the app, then I try To use this code to capture a picture of the map:
Taken from: http://www.b4x.com/android/forum/threads/how-to-make-screenshots.10199/#post-56790
The problem is that the image it only has the Google's logo and the zoom buttons, but not the map.
Is there a better way to save a picture of the Google Maps?
Thanks
Google Maps Android v2 tutorial
And the map shows on the app, then I try To use this code to capture a picture of the map:
B4X:
Sub GetMap
Dim Obj1, Obj2 As Reflector
Dim bmp As Bitmap
Dim c As Canvas
Obj1.Target = Obj1.GetActivityBA
Obj1.Target = MapPanel
bmp.InitializeMutable(MapPanel.Width, MapPanel.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.DirDefaultExternal, "map.png", False)
bmp.WriteToStream(Out, 100, "PNG")
Out.Close
End Sub
Taken from: http://www.b4x.com/android/forum/threads/how-to-make-screenshots.10199/#post-56790
The problem is that the image it only has the Google's logo and the zoom buttons, but not the map.
Is there a better way to save a picture of the Google Maps?
Thanks