pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.12k stars 257 forks source link

Screenshot & Screencast #33

Closed jmfayard closed 8 years ago

jmfayard commented 8 years ago

Hello and thank you for your plugin.

A screenshot and/or a screencast is often worth 10.000 words to illustrate your point.

So I made three bash helper funcitons (definitions below)

What do you think of integrating that in your plugin?


### $HOME/.bash_profile

export DESKTOPFOLDER="$HOME/Downloads"
export ANDROIDFOLDER="/storage/sdcard1"
android_screenshot() {
    adb devices
    adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "$DESKTOPFOLDER/androidscreenshot-$(filetimestamp).png"
    open "$DESKTOPFOLDER"
}
android_recordscreencast() {
    adb devices
    echo "Press Ctrl-C to stop screencast"
    echo "then type: $ android_pullscreencast"
    echo 
    adb shell screenrecord --verbose "$ANDROIDFOLDER/screenrecord.mp4"
}

android_pullscreencast() {
    adb pull "$ANDROIDFOLDER/screenrecord.mp4" "$DESKTOPFOLDER/androidscreencast-$(filetimestamp).mp4"
    open $DESKTOPFOLDER
}
filetimestamp() {
    echo $(date "+%Y%m%d-%H:%M:%S")
}
pbreault commented 8 years ago

Hi @jmfayard, It sounds useful but for now it's outside of the scope of the plugin. The feature is already available in Android Studio and I don't want to duplicate it.

Thanks for the suggestion though!.