Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobile-emulator-screencapture

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobile-emulator-screencapture

  • 0.1.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Mobile::Emulator::Screencapture

Gem Version Build Status

Ruby wrapper for take screenshot and screenrecord on ios/android emulators.

How to work

Android

Using adb screencap and adb screenrecord
see: https://developer.android.com/studio/command-line/adb.html

adb screenrcord is only supported: Android >= 4.4(API Level 19)

iOS

Not supported yet

Using xcrun simctl io screenshot and xcrun simctl io recordVideo

see: xcrun simctl io --help

xcrun simctl io screenshot is only supported: Xcode >= 8.2

Installation

gem 'mobile-emulator-screencapture'

Usage

Android

require 'mobile/emulator/screencapture'

android = Mobile::Emulator::Screencapture.create(
  platform: "android",
  screenshot_dir: "./screenshot",
  screenrecord_dir: "./screenrecord",

  # options for adb screenrecord
  width: 720,
  height: 360
  bit_rate: 6_000_000,
  time_limit: 180
)

android.screenshot("test")
# > ./screenshot/test.png

android.start_screenrecord("test")
sleep 30
android.stop_screenrecord
# > ./screenrecord/test.mp4

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Kesin11/mobile-emulator-screencapture.

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 17 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc