Is it possible to programmatically take a screenshot of an activity that is currently not displayed? Maybe using findViewById()?
I would want my app to take a screenshot of another activity after a button press in the current activity.
Why won't something like this work?
Bitmap screen; View v1 = findViewById(R.id.someView);
v1.setDrawingCacheEnabled(true);
screen = Bitmap.createBitmap(v1.getDrawingCache());
v1.setDrawingCacheEnabled(false);