开发者

Code for Screen Capture any screen of Android

开发者 https://www.devze.com 2023-02-22 09:12 出处:网络
I am looking for the code which will be able to take screen shot of the any android screen.. I have a device running in rooted mode.. I searched on net.. but all I get informaiton is that it re开发者_

I am looking for the code which will be able to take screen shot of the any android screen.. I have a device running in rooted mode.. I searched on net.. but all I get informaiton is that it re开发者_StackOverflow社区quires rooted access.. thats it.. I am unable to get enough information on how to go further.. if anyone can post a code or link which gives me information how I can take screen show programatically.. I have Android device with root access.

Thank you.


You can use the following code, But this will be bit slow...
I hope you arent trying to make video out of these ;)

process = Runtime.getRuntime().exec("/system/bin/screencap -p " + path + ”/file.png ”);
0

精彩评论

暂无评论...
验证码 换一张
取 消