Android Tutorial How to make screenshots!

madSac

Active Member
Licensed User
Longtime User
You cannot take screenshots of other applications. On some rooted devices there are all kinds of workarounds. Search google for more information. I haven't tried any of them.
Ok So there is no other way without rooting.
Fine.
Thank you.
 

yttrium

Active Member
Licensed User
Longtime User
You cannot take screenshots of other applications. On some rooted devices there are all kinds of workarounds. Search google for more information. I haven't tried any of them.

This is actually wrong - you can easily take a screenshot of the current screen by invoking
B4X:
/system/bin/screencap -p /sdcard/screenshot.png
which outputs a screenshot of the current immediate screen to "screenshot.png" on the sdcard.

This method works in API14 and above without root being required, no matter the system, even if the device is running Sense or Touchwiz.
 

Laurent95

Active Member
Licensed User
Longtime User

Hello Agraham,

Very nice, that works fine
How i can get a screen shot from only an imageview of the activity ?
What i must change in this code, if it's possible of course.

Thanks for your help.

Regards
 

Laurent95

Active Member
Licensed User
Longtime User
It is much simpler. You can get the Bitmap with ImageView.Bitmap and then save it with Bitmap.WriteToStream.

Hi Erel,

Thank you for responding, but, oppppps, i have forget one thing.
I want to get a screen shot from an animate bitmap, who's animated by an external library.
And this solution can't work

Then of course i need to take the screen shot only for a part of the screen otherwise i still get a fixed drawing of the bitmap.

Regards.
 

priusfan

Member
Licensed User
Longtime User
hello
I use with success agraham's method.
but it does not work when using gmap: the panel with the map is blank...


here is the real thing:


and here is the screencapture:


any ideas about a solution?
 

me68

Member
Licensed User
Longtime User
If you press Home-Button & Power-Button simultan for 1 second a white rectangle is drawn on the Screen and a screenshot is stored at \Images\screenshots ...




It must be possible ...

Martin
 

priusfan

Member
Licensed User
Longtime User
@me68 (private joke)
hello Martin

I remind you this application is made for an electric car...
Using one full hand for holding the phone/tablet and 2 fingers from the other one for taking a screenshot is a bit dangerous when driving.


some details about this dev are here
me68 joined me on this dev and made it better & better.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…