ScreenRecorder: An extension for screen recording

1. Introduction

Screen Recorder is an extension which offers a set of tools to record screen customizable features

Latest Version: 2
Released: 2020-07-10T18:30:00Z
Last Updated: 2024-05-01T18: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 and above) , android.permission.POST_NOTIFICATIONS (for Android 13 and above)

Key Features:

  • Simple yet feature-rich screen recording with a lot of customization options
  • Keep recording screen even after app is closed
  • Control recording like Stop, Resume and Pause without opening app, from Notification itself
  • Proper error and information handling with GotInfo and ErrorOccurred events
  • Clicking notification will open app if not running otherwise bring it to front so there won’t be multiple instances of screen running at a time

2. Blocks

3. Documentation

Events

ErrorOccurred Event invoked when an error occurs while recording
error | text
GotInfo Event invoked when an informational event occurs while recording
info | text
RecordingStarted Event indicating that recording has started.
RecordingCompleted Event indicating that recording has completed.
filePath | text

Methods

ResetProperties Sets property values according to video quality.
GetSupportedProfiles Returns a list of supported video quality profiles
GetAudioEncoders Returns a dictionary of all Audio Encoders in which encoder's name is key. All audio encoders might not be compatible with video encoders.
GetVideoEncoders Returns a dictionary of all Video Encoders in which encoder's name is key.All video encoders might not be compatible with audio encoders.
MinimizeApp Minimizes current app
InitializeRecorder Prepares the recorder to begin capturing screen
PauseRecording Pauses recording.It does nothing if the recording is already paused.
ResumeRecording Resumes recording.It does nothing if the recording is not paused.
StartRecording Starts capturing the screen and saving to file specified.
IsRecording Returns whether recorder is recording screen or not
StopRecording Stops the recording and resets the recorder to its idle state.After calling this method, you will have to initialize recorder again.

Properties

NotificationText Sets notification text
Property Type : write-only
Accepts : text
NotificationTitle Sets notification title
Property Type : write-only
Accepts : text
NotificationIcon Sets notification icon
Property Type : write-only
Accepts : text
AudioEncoder Returns the audio encoder used to encode audio recording.
Property Type : read-write
Accepts : number
VideoEncoder Returns the video encoder used to encode video recording.
Property Type : read-write
Accepts : number
RecordAudio Sets whether MIC audio should be recorded or not
Property Type : write-only
Accepts : boolean
MaxDuration Returns the maximum duration of recording.
Property Type : read-write
Accepts : number
MaxFileSize Returns the maximum filesize (in bytes)
Property Type : read-write
Accepts : number
VideoEncodingRate Returns the video encoding bit rate.
Property Type : read-write
Accepts : number
VideoFormat Returns format of output file.
Property Type : read-write
Accepts : number
FileName Returns the file path of output file.
Property Type : read-write
Accepts : text
FrameRate Returns the frame rate of the video to be captured.
Property Type : read-write
Accepts : number
VideoQuality Returns the video qaulity profile.
Property Type : read-write
Accepts : number
UseDefaultProfile Returns whether recorder should use default profile or not.
Property Type : read-write
Accepts : boolean
AudioEncodingBitRate Returns the audio encoding bit rate for recording.
Property Type : read-write
Accepts : number
ApiVersion Returns Android Version code
Property Type : read-only
Accepts : number
ActionButtons Sets whether Stop, Pause and Resume buttons should be shown in notification or not
Property Type : write-only
Accepts : boolean

4. Downloads

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

5. Additional Resources

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

Demo Video:

6. Credits

I am thankful to following for being beta-tester of this extension and giving me precious advices :heart_eyes:
@Ken (Special thanks for helping me to solve bugs :hugs: )
@Vaibhav
@themaayur
@rizu
@Mateja
@Xoma
@Vedang

7. Updates/Bug Fixes

ChangeLog Version 1.2

ScreenRecorder: An extension for screen recording - #20 by vknow360 - Extensions - MIT App Inventor Community

ChangeLog Version 1.3
  • Fixed UI Not Responding error
ChangeLog Version 1.4
  • Extension is now compatible with latest android versions
ChangeLog Version 1.5
  • Fixed bugs which were occurring on older devices
ChangeLog Version 2

New Blocks:
image
image
image

Changes:

  • GetSupportedProfiles now returns dictionary instead of list

  • Screen Recording notification can be customised now
    image

  • Service keeps running even when app is closed.
    On next app launch, you’ll be able to get recording status.

  • Clicking on recording notification will (i) open app if not running (ii) bring app to front if already running
    It’ll prevent multiple instances to be present at a time

Extension has been completely re-written so there are a lot of internal behavioral changes to improve user experience and also to omit possible Runtime Errors

Hope it helps! :grin:

68 Likes

One more great extension. Keep it up and thanks for this amazing extension.

Very Good Extension. Thanks To You For Making Me Betatester

2 Likes

Great Extenstion

Thank you very much

super good

Superb extension! An extension which might open up new possibilities for the things that can be done with Kodular Platform! :+1:

Thanks for having me as a beta-tester :slightly_smiling_face:

2 Likes

Thanks for having me as a beta-tester image

2 Likes

Great Work! :+1: :clap:

Great work

2 Likes

A Great Extension from a Great Devloper. :v::v:

Happy to work with you :relaxed:

4 Likes

Very useful extension

I have not much helped you in beta testing, still my name is there, thank you.

OMG a series of great extensions and full time support for every product that’s amazing… Keep it up
Your work is always awesome and surprising… :heart:

2 Likes

I am waiting from tomorrow. Great extention by great devloper. Keep it up

Very good extension ! :heart_eyes:
But I have a question, does it appear on other apps ? (I don’t mean working in background, but like other screen recorders :wink:)

Yes.
Give it a try and I am sure you will not get disappointed.

2 Likes

Great Work as always.

@youssef_achour :point_down::point_down::point_down:

1 Like

wow :innocent: :relaxed: :heart_eyes: :smiling_face_with_three_hearts:

1 Like

Great extension.

1 Like