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:  July 11, 2020
Last Updated:  Today
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 StopResume 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

image

3. Documentation

ErrorOccurredEvent invoked when an error occurs while recording
error | text
GotInfoEvent invoked when an informational event occurs while recording
info | text
RecordingStartedEvent indicating that recording has started.
RecordingCompletedEvent indicating that recording has completed.
filePath | text
ResetPropertiesSets property values according to video quality.
GetSupportedProfilesReturns a list of supported video quality profiles
GetAudioEncodersReturns a dictionary of all Audio Encoders in which encoder’s name is key. All audio encoders might not be compatible with video encoders.
GetVideoEncodersReturns a dictionary of all Video Encoders in which encoder’s name is key.All video encoders might not be compatible with audio encoders.
MinimizeAppMinimizes current app
InitializeRecorderPrepares the recorder to begin capturing screen
PauseRecordingPauses recording.It does nothing if the recording is already paused.
ResumeRecordingResumes recording.It does nothing if the recording is not paused.
StartRecordingStarts capturing the screen and saving to file specified.
IsRecordingReturns whether recorder is recording screen or not
StopRecordingStops the recording and resets the recorder to its idle state.After calling this method, you will have to initialize recorder again.
NotificationTextSets notification text
Property Type : write-only
Accepts : text
NotificationTitleSets notification title
Property Type : write-only
Accepts : text
NotificationIconSets notification icon
Property Type : write-only
Accepts : text
AudioEncoderReturns the audio encoder used to encode audio recording.
Property Type : read-write
Accepts : number
VideoEncoderReturns the video encoder used to encode video recording.
Property Type : read-write
Accepts : number
RecordAudioSets whether MIC audio should be recorded or not
Property Type : write-only
Accepts : boolean
MaxDurationReturns the maximum duration of recording.
Property Type : read-write
Accepts : number
MaxFileSizeReturns the maximum filesize (in bytes)
Property Type : read-write
Accepts : number
VideoEncodingRateReturns the video encoding bit rate.
Property Type : read-write
Accepts : number
VideoFormatReturns format of output file.
Property Type : read-write
Accepts : number
FileNameReturns the file path of output file.
Property Type : read-write
Accepts : text
FrameRateReturns the frame rate of the video to be captured.
Property Type : read-write
Accepts : number
VideoQualityReturns the video qaulity profile.
Property Type : read-write
Accepts : number
UseDefaultProfileReturns whether recorder should use default profile or not.
Property Type : read-write
Accepts : boolean
AudioEncodingBitRateReturns the audio encoding bit rate for recording.
Property Type : read-write
Accepts : number
ApiVersionReturns Android Version code
Property Type : read-only
Accepts : number
ActionButtonsSets whether Stop, Pause and Resume buttons should be shown in notification or not
Property Type : write-only
Accepts : boolean

4. Downloads

5. Support me

Please consider donating some amount to keep me motivated.

6. 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

Demo Video: https://www.youtube.com/watch?v=oEanKkeMbH4

7. Updates

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

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!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments