Implementation of screenshot capture in Android system (with code included) and screenshot capture in android system

Source: Internet
Author: User
Tags tmp folder

Implementation of screenshot capture in Android system (with code included) and screenshot capture in android system
1. I have been writing a blog on the background for almost two years. I have written more than 100 articles. The most popular article is how to achieve screenshots of the android system. In fact, google android_screen_shot will find the right method, but those are all years ago. After android4. *, android corrected the source code so that the previous methods could not be used. Thanks to cjd6568358, we discussed it together and finally implemented the screenshot function of the android system. In order to make the coder that wants this function less detours, we organized the code into an open-source project.
2. Ideas
In fact, the main idea is as mentioned in my blog post. If you are interested, you can check it out. [Android4.3] recording a complete screenshot capture of the android source code (different from the old version on the Internet) test and failure analysis of the screenshot function of android4.3 perform system screenshot (no portability at present) in the operating source code of android 4.3 and later versions of Android4.0 Background service Cross-process screenshot current screen Summary (reference from cjd6568358)

3. you can use this method to easily access open-source projects. Download the jar file and import it to your own project. Call the function name: takeScreenshot (Context context, String fileFullPath). If the complete file path is empty, the method automatically creates a file name at the current time and stores it in the/data/local/tmp folder.

Project address: star after use. Thank you!

/********************************

* This article is from the blog "Li bogarvin"

* Reprinted please indicate the source: http://blog.csdn.net/buptgshengod

**************************************** **/




How to use the code in android to implement screenshots

Blog.csdn.net/..520403

Hope to help you!

Can screenshots of android code be implemented? How can this problem be achieved? Help Ang

You can directly use FrameBuffer: In/dev/graphics, fb0 ~ Fb4: This is frame buffering. The specific format is unknown. You can analyze it.

Alternatively, if your interface is a normal interface, you can directly create a Bitmap and Canvas, and use View. draw to draw it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.