How can i record the Android device screen? [closed]

走远了吗. 提交于 2019-12-18 03:42:03

问题


I want to create an application that will enable the users to Capture Screen of their Android device. like any screen recorder software we used in pc please help me out

Edit : 1

here Screen capture refers to Screen recording of device screen as video not snapshots of screen.


回答1:


the only way to do that is with a rooted device.

try reading this answer: Programmatic screencapture on mobile device

EDIT 1:

screen capture as video is the same is screen capture of only one image.

EDIT 2:

there are different apps that record video from screen such as Screencast and ShootMe. you can call them from within the app using the startActivity(new Intent(String action)); with their action names.

for more read this: Open third party app




回答2:


I havn't tried this but think it can be done. Kitkat provided new features and this is one of them You can use this command to record screen as a video

adb shell screenrecord /sdcard/demo.mp4

You can find more details here

you can execute the adb command from your app. Check the answer here




回答3:


As per Android 5.0 (Lollipop), screen recording can be done without requiring root using the MediaProjection package. An example of a recording activity can be found here.




回答4:


Summary from longer answer:

Normal Android apps lack permission to capture the frame buffer (specifically, they aren't members of the AID_GRAPHICS group) so you CANNOT capture the screen from an Android app without some way of getting around the privilege issue. Apps do this in one of two ways: either by root or by starting a server via the ADB interface. So, it can be done without root, but you need to start you own server and connect to it from your app (and, obviously, safely handle the security implications of this)



来源:https://stackoverflow.com/questions/10680325/how-can-i-record-the-android-device-screen

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!