GoogleMaps Android Library: ScreenShot issue

daniel69

Member
Licensed User
Longtime User
The agraham code for programmatic screenshot (it uses the Reflector library 2.04, see the code below) provides a blank screenshot (present only the zoom +- buttons) when using this library (Google Maps Android Library 1.0.1).... any workaround?


Sub ScreeShot(fName As String)As String

Dim Obj1, Obj2 As Reflector
Dim bmp As Bitmap
Dim c As Canvas
Dim Out As OutputStream
Dim c1 As Int
Dim ret As Int

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)
Out = File.OpenOutput(File.DirDefaultExternal & "/" & globv.cCHARTS, Name, False)
bmp.WriteToStream(Out, 100, "JPEG")
Out.Close

End Sub
 

daniel69

Member
Licensed User
Longtime User
Upvote 0

daniel69

Member
Licensed User
Longtime User
Thanks Erel! I also have a WebView in the app (where the screenshot code is working), but I've noticed that the Google Maps Android Library is much faster (in loading maps/markers and zooming) ....
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…