Giter Club home page Giter Club logo

androidscreenshot_sysapi's Introduction

AndroidScreenShot_SysApi

非常优雅的方案实现屏幕截图,利用android 5.0 之后的录屏API获取一帧画面,来实现截屏。

特性

  1. 方便后台service调用截屏功能。

  2. 打破老旧的截屏方案,只能截当前activity不能截状态栏的问题。

使用

  1. 直接编译代码run,等待toast成功.

    注意:目前代码截图成功后保存到使用外置私有存储,不需要申请外部存储权限,所以不要惊讶,不会崩溃的。

  2. 自定义使用

    直接使用Shotter,或者直接使用ScreenShotActivity。

  3. 更多拓展:

    因为他是一个透明并隐藏的activity,玩法有很多:

    3.1截图桌面;

    3.2对其他app进行截图:你自己试着调整shotter的delay时间为3秒,然后start截图,再切换到其他app里,等toast截图成功。

    3.3从service里启动:你要改manifaest,配置action,从service里启动试试,代码里有。

androidscreenshot_sysapi's People

Contributors

brucewind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.