Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to take a screenshot of other app programmatically without root permission, like Screenshot UX Trial?
    primarykey
    data
    text
    <p>How to take a screenshot of other app programmatically without root permission, like Screenshot UX Trial?</p> <ol> <li><p>I know I can capture the bitmap of the root view in my app. But I can't get the root view of the other app when my app is running in background</p> <p><code>bitmap = Bitmap.createBitmap(rootview.getDrawingCache());</code></p></li> <li><p>There is a permission for capturing current frame buffer in Manifest: <code>android.permission.READ_FRAME_BUFFER</code>. But some website says it's for signature app only.</p> <p><a href="http://rupertrawnsley.blogspot.hk/2011/11/android-permissions-protection-levels.html">Check Android Permissions - Protection Levels</a></p></li> </ol> <p>After trying Screenshot UX Trial, I read the permission:</p> <ul> <li>INTERNET: for connect to localhost screenshot server for rooted phone.</li> <li>SYSTEM_ALERT_WINDOW: for topmost camera button.</li> <li>VIBRATE: for vibrate feedback.</li> <li>WRITE_EXTERNAL_STORAGE: to save the screenshot.</li> <li>GET_TASKS: for detect foreground Develoment setting activity for non rooted&amp;non preloaded capture method.</li> </ul> <p>It seems either <code>SYSTEM_ALERT_WINDOW</code> or <code>GET_TASKS</code> allow the app to take screenshot. I have two guess of how it works:</p> <ol> <li>It may be able to access the <code>Activity</code> of the foreground activity, it gets the root view of the <code>Activity</code>, capture its screenshot.</li> <li>Calling <code>glreadpixels</code></li> </ol> <p>If you try one of my guess, please let me know the result.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload