Skip to content

Commit

Permalink
beautify screenshots: no status icon, set time to 12:00, no charging,…
Browse files Browse the repository at this point in the history
… etc.

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
  • Loading branch information
tobiasKaminsky committed Dec 18, 2019
1 parent 0f41fbb commit 9246373
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ skip_docs
## public lanes

lane :screenshotsPhone do
beautifyPhone()
build_for_screengrab()

screengrab(
Expand All @@ -24,6 +25,7 @@ lane :screenshotsPhone do
end

lane :screenshotsTablet do
beautifyPhone()
build_for_screengrab()

screengrab(
Expand Down Expand Up @@ -105,6 +107,15 @@ lane :createDevRelease do |options|
sh("mv ../build/outputs/apk/versionDev/release/*.apk ../release/")
end

desc "Beautify phone for screenshots: set time, remove other icons, no charging"
lane :beautifyPhone do
sh("adb shell settings put global sysui_demo_allowed 1")
sh("adb shell am broadcast -a com.android.systemui.demo -e command clock -e hhmm 1200")
sh("adb shell am broadcast -a com.android.systemui.demo -e command network -e mobile show -e level 4 -e datatype false")
sh("adb shell am broadcast -a com.android.systemui.demo -e command notifications -e visible false")
sh("adb shell am broadcast -a com.android.systemui.demo -e command battery -e plugged false -e level 100")
end

## private lanes

desc "Build debug and test APK for screenshots"
Expand Down

0 comments on commit 9246373

Please sign in to comment.