ScreenRecorder: An extension for screen recording

1.Introduction

Screen Recorder is an extension which offers a set of tools to record screen without root access.

Latest Version: 1.3
Released: 2020-07-10T18:30:00Z
Last Updated: 2021-04-26T18:30:00Z
Requires: Api 21 (and Api 24 for Pause and Resume methods)
Permissions: android.permission.WRITE_EXTERNAL_STORAGE and android.permission.RECORD_AUDIO (and android.permission.FOREGROUND_SERVICE for Api 29 )

2.Blocks

image
image
image
image
image

3.Documentation

  • On Error
    Event invoked when an error occurs while recording
    image
    error ~ text
  • On Info
    Event invoked when an informational event occurs while recording
    image
    info ~ text
  • On Recording Completed
    Event indicating that recording has completed.
    image
    filePath ~ text
  • On Recording Started
    Event indicating that recording has started.
    image
  • Get Supported Profiles
    Returns a list of supported video qaulity profiles
    image
    Returns : List< Integer >
  • Initialize Recorder
    Prepares the recorder to begin capturing and saving data.
    image
  • Is Recording
    Returns whether recorder is recording screen or not
    image
    Returns : boolean
  • Mimimize App
    Minimizes current app
    image
  • Pause Recording
    Pauses recording.It does nothing if the recording is already paused.
    image
    Requires Api 24
  • Reset Properties
    Sets property values according to video quality.
    image
  • Resume Recording
    Resumes recording.It does nothing if the recording is not paused.
    image
    Requires Api 24
  • Start Recording
    Starts capturing the screen and saving to file specified.
    image
  • Stop Recording
    Stops the recording and resets the recorder to its idle state.After calling this method, you will have to initialize recorder again to record again.
    image
  • Api Version
    Returns android version code
    image
    Returns : int
  • Audio Encoder
    Sets/Returns the audio encoder used to encode audio recording.
    image
    Returns : int
  • Audio Encoding Bit Rate
    Sets/Returns the audio encoding bit rate for recording.Using 0 will reset it to default.
    image
    Returns : long
  • File Name
    Sets/Returns the path of the output file to be produced.Use absolute file path here.If you want to use default file path then pass an empty string.
    image
    Returns : text
  • Frame Rate
    Sets/Returns the frame rate of the video to be captured.
    image
    Returns : int
  • Max Duration
    Sets/Returns the maximum duration (in ms) of the recording session.Setting it 0 will remove duration limit.
    image
    Returns : long
  • Max File Size
    Sets/Returns the maximum filesize (in bytes) of the recording session.Setting it 0 will remove file size limit.
    image
    Returns : long
  • Use Default Profile
    Sets/Returns whether recorder should use default profile (set using VideoQuality) for recording or not.
    image
    Returns : boolean
  • **Video Encoder **
    Sets/Returns the video encoder used to encode video recording.
    image
    Returns : int
  • Video Encoding Rate
    Sets/Returns the video encoding bit rate for recording.Setting it 0 will reset it to default.
    image
    Returns : long
  • Video Format
    Sets/Returns the format of the output file produced during recording.
    image
    Returns : int
  • Video Quality
    Sets the video quality profile used for recording.ResetProperties method will use this profile to get default values.To use this profile in recording you must have to set UseDefaultProfile to true.
    image
    Returns : int

4.Downloads

Aix

Kindly consider about donating some amount to keep me motivated :heart:

5.External References

Audio Encoder: MediaRecorder.AudioEncoder
Video Encoder: MediaRecorder.VideoEncoder
Output Format: MediaRecorder.OutputFormat
Video Quality: Camcorder Profile

Note: Not every video/audio encoder supports all output formats.
This can help you to chose appropriate properties:
Media Formats

6.Updates/Bug Fixes

ChangeLog Version 1.2

ScreenRecorder: An extension for screen recording - #20 by vknow360

ChangeLog Version 1.3
  • Fixed UI Not Responding error

Hope it helps! :grin:

27 Likes

Great Extension.

5 Likes

nice extension @vknow360

5 Likes

Does it record screen even if app is closed.?

1 Like

No.
App should be running in background.

5 Likes

That's impressive! It helped me a lot, thank you very much, this is amazing.

4 Likes

Hi @Hyperfect Welcome
Glad you liked it :heart_eyes:

4 Likes

This is fantastic!!! I'm new to App Inventor, and coding in general, and this extension is very powerful while being simple! Great job!!! :clap: :clap: :clap:

Thanks for sharing!

Cheers!

4 Likes

Can you add a event like on recorder initialized

3 Likes

The extension works synchronously so there is no need to add that event.
Since you initialize the recorder so you can perform specific task just after that.

6 Likes

it means it initialeses instantly or takes some time?

2 Likes

It takes some time and stops main thread for that period because it works synchronously.

However if any error occurs then Error Occurred event will be triggered.

4 Likes

have you created this Extension using @UsesServices ??

1 Like

No, this extension has nothing to do with services.

Edit: Now it uses Services.

3 Likes

use like some floating views when app runs in background

3 Likes

amazing @vknow360!!!:smile:

3 Likes

Did not work for me in the background

2 Likes

have u used wat i said?

3 Likes

ChangeLog Version 1.2

New blocks
image

Bug Fixes

  • Fixed bug which was crashing app on Android 10 (Thanks to @Angelo_Angius for reporting the bug and testing the beta version )
  • Minor bug fixes

Changes

  • Some internal changes (Set min sdk to 21)
  • Changed default file path for Android 10 (it is stored in Recordings dir of ASD)

Known Bugs/Issues

  • Some events are getting invoked multiple times

Aix
com.sunny.ScreenRecorder.aix (31.7 KB)

Aia
ScreenRecorder.aia (72.6 KB)

Note : In case anything goes wrong then simply search for Logging.txt in the file manager.



Merry Christmas :christmas_tree: :partying_face:

14 Likes

How do I make it so only the phone/device output audio is recorded? I do not want the phone microphone to record sound. Only sound coming from the phone/device

1 Like