Android Question Taking Screenshot of Entire Activity

Discussion in 'Android Questions' started by trueboss323, Jun 21, 2015.

  1. trueboss323

    trueboss323 Active Member Licensed User

    Hi Everyone, I am using this code to try and take a screenshot of the entire screen:

    Log("TakeScreenshot activated")
    ' Take a screenshot.
    Dim Obj1, Obj2 As Reflector
    Dim bmp As Bitmap
    Dim c As Canvas
      Obj1.Target = Obj1.GetActivityBA
      Obj1.Target = Obj1.GetField(
    Activity.Width, Activity.Height)
    Dim args(1As Object
    Dim types(1As String
      Obj2.Target = c
      Obj2.Target = Obj2.GetField(
    0) = Obj2.Target
    0) = ""
    "draw", args, types)
    Dim Out As OutputStream
      Out = 
    File.OpenOutput(File.DirInternal, "Screenshot.png"False)
    ToastMessageShow("Screenshot Captured"False)
    But this code takes a cropped screenshot. It does not include the title and status bar. Also I am used a tabbed application, so it does not take a photo of the tabs either.
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is not possible to programmatically take a full screenshot.
  3. ilan

    ilan Expert Licensed User

    You can just draw them. The title bar and the tabs will not change anyway so you can first take the screenshot, draw manually the titlebar on a different panel then add the screenshot then draw the tabs on the bottom and take a screenshot of that panel...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice