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

Source: Internet
Author: User

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 the rabbit-loving Tom radish, 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, the code we compiled is made into an open-source project. 2. The main idea is what I mentioned in my blog post. If you are interested, read it. [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 the moment) in the operating source code of android 4.3 and later versions of Android4.0 and Background service Cross-process screenshot of current screen summary (reference the rabbit-loving radish)

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!
Discuss with the author and follow the Public Account "Mortal machine learning"

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.