Skip to content

A GIF recorder, based on gradle script to record screen in Android Device, and the record (XXX.gif) will be auto uploaded to your PC.

Notifications You must be signed in to change notification settings

fashare2015/gradle-screen-record

Repository files navigation

CSDN

More information of gradle-screen-record with rich pictures, please see this blog:
http://blog.csdn.net/a153614131/article/details/54137734

Supported OS

  • Mac osx

Usage

0. Working with gradle environment

Gradle is required.


1. Prepare tools (Skip this part if installed)

Make sure these tools installed,or else install them first:

  • adb: We use it to get screen-record files with .mp4 format.
  • ffmpeg: We use it to convert the format of these files, from .mp4 to .gif.

More infomation about Prepare tools


2. Apply gradle-screen-record (Just one line)

Apply gradle-screen-record in rootProject/build.gradle, don't forget to Sync Gradle !!!:

apply from: "https://raw.githubusercontent.com/fashare2015/gradle-screen-record/master/screen-record.gradle"

3. Record Screen

excute gradle cmd

excute gradle cmd with three params:

  • PfileName: [Required] Name of output gif**(without postfix)**.
  • Psize: [Optional] Size of output gif.
  • Ptime: [Optional] Time of output gif.

For example:

./gradlew screenRecord -PfileName=test

Or:

./gradlew screenRecord -PfileName=test -Psize=1080x1920 -Ptime=5

operate your modile phone

When you see "> Building 50% > :screenRecord" in the terminal, the screen recording is begining. Just operate your modile phone as you want, and it will stop after "-Ptime" second.


4. Complete !!!

You will find the generated gif file in rootProject/screen-record/test.gif !!!

By the way, add it to git~

git add screen-record/.


TODO

support for windows.

Make issues or pull request, if you have good ideas ~


Thanks

Helper to upload Gradle Android Artifacts to Maven repositories

深入理解Android之Gradle

About

A GIF recorder, based on gradle script to record screen in Android Device, and the record (XXX.gif) will be auto uploaded to your PC.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages