isvisoft / flutter_screen_recording Goto Github PK
View Code? Open in Web Editor NEWA new Flutter plugin for record the screen.
License: MIT License
A new Flutter plugin for record the screen.
License: MIT License
Two problems show up when using the plugin on a physical Galaxy S9 running Android 10, i.e. not an emulator. Both problems have to do with the way the plugin configures the screen size to MediaRecorder.
To Duplicate
Configuration
Flutter (Channel stable, 1.22.3, on Mac OS X 10.15.7 19H2, locale en-US)
I want to record screen on flutter app by using flutter_screen_recording plugin ,
but when i call startRecordScreen() mehtod , app become crashed ,
error message showing like this:
FATAL EXCEPTION: main
E/AndroidRuntime( 8312): Process: com.example.my_screen_recording, PID: 8312
E/AndroidRuntime( 8312): java.lang.NoSuchMethodError: **No virtual method onActivityResult(ILandroid/content/Intent;Landroid/app/Activity;)**V in class Lcom/hbisoft/hbrecorder/HBRecorder; or its super classes (declaration of 'com.hbisoft.hbrecorder.HBRecorder' appears in /data/app/com.example.my_screen_recording-1/base.apk)
E/AndroidRuntime( 8312): at com.isvisoft.flutter_screen_recording.FlutterScreenRecordingPlugin.onActivityResult(FlutterScreenRecordingPlugin.kt:70)
Gives the error Shutting down VM and FATAL EXCEPTION: main
My console:
I/MediaRecorderJNI(22574): setup
I/System.out(22574): Original Resolution
I/System.out(22574): 720 x 1450
I/System.out(22574): Calcule Resolution
I/System.out(22574): 635 x 1280
I/MediaRecorderJNI(22574): setVideoSource(2)
W/MediaRecorder(22574): setOutputFile: path = /storage/emulated/0/DCIM/Title.mp4
E/Media_APM : (22574): isCalledPackage return false
I/MediaRecorderJNI(22574): setVideoSize(635, 1280)
I/MediaRecorderJNI(22574): setVideoEncoder(2)
I/MediaRecorderJNI(22574): setParameter()
I/MediaRecorderJNI(22574): setVideoFrameRate(60)
W/MediaRecorder(22574): prepare: mPath = /storage/emulated/0/DCIM/Title.mp4
I/MediaRecorderJNI(22574): setOutputFile
I/MediaRecorderJNI(22574): prepare
E/MediaRecorder(22574): prepare failed: -2147483648
D/--INIT-RECORDER(22574): prepare failed.
PS C:\Users\Gustavo Huerta\Documents\proyects\screenrecord> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.17.0, on Microsoft Windows [Versión 10.0.18363.836], locale es-CL)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
[√] VS Code (version 1.45.1)
[√] Connected device (1 available)
• No issues found!
You cannot choose the path to save the output video to.
I am using Flutter v1.12.13+hotfix.8 (stable channel) and Android SDK version 29.0.3 . The play button is not doing anything and there is no error in the console.
Thanks for this very helpful plug-in. A quick suggestion to improve the documentation to specify the minimum SDKs required.
This plug-in requires Android SDK 21+ and iOS 10+
In my case build:gradle:4.1.0 doesn't work then I decrease the version to build:gradle:3.5.0 and it starts launching. But While I click on Record Screen Button it just crashed and Record with audio button also didn't work. Any solutions for these issues?
This is the error that is printed in the terminal when using a record screen with audio.
D/permissions_handler( 9128): No android specific permissions needed for: 9
I/flutter ( 9128): Foreground on Started
E/MediaRecorder( 9128): setAudioSource called in an invalid state(4)
I/System.out( 9128): Error onMethodCall startRecordScreen
I/System.out( 9128): null
I/flutter ( 9128): current datetime is 2020-10-05 09:37:31.223983
Hi, trying for an android app.
App closes just after accepting the permission after calling startScreenRecord function without audio.
It does nothing if using audio.
Any solution?
When i call this method
startScreenRecord() async {
bool start = await FlutterScreenRecording.startRecordScreen("Title");
debugPrint('start: '+start.toString());
}
Popup permission is not showing and method return false. Can you help me how to show this popup to user?
First of all, thank you for the awesome plugin :)
As flutter grows, we'd like this plugin to grow with it. It'd be great to have more supported platforms and a better api in the plugin.
Currently supported platforms:
It'd also be great if we could take a screenshot using the plugin :)
It is recommended to add these to android/build.gradle
.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.HBiSoft:HBRecorder:0.1.4'
}
There are not video format or quality parameters.
This can also help reduce the large file size being produced in the current version.
The app crashes while using this package. When I call the startRecordScreen(name) function, as in the package, i see a native alert dialog as below.
When i click start now as on the dialog, the app crashes giving the below error:
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=333, result=-1, data=Intent { (has extras) }} to activity {com.script.scriptGames/com.script.scriptGames.MainActivity}: java.lang.IllegalStateException: failed to get surface E/AndroidRuntime(31376): at android.app.ActivityThread.deliverResults(ActivityThread.java:5080) E/AndroidRuntime(31376): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5121) E/AndroidRuntime(31376): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) E/AndroidRuntime(31376): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime(31376): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime(31376): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2183) E/AndroidRuntime(31376): at android.os.Handler.dispatchMessage(Handler.java:107) E/AndroidRuntime(31376): at android.os.Looper.loop(Looper.java:241) E/AndroidRuntime(31376): at android.app.ActivityThread.main(ActivityThread.java:7617) E/AndroidRuntime(31376): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(31376): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(31376): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:941) E/AndroidRuntime(31376): Caused by: java.lang.IllegalStateException: failed to get surface
Currently, In your plugin, the screen record is done for fullscreen, How to record only a particular area in the screen or particular widget.Please guide
Hi, I'm having trouble getting this plugin to work on Android devices.
I get the error below, I believe related to the output file. I'm no Android expert, and hours of search on Google about MediaRecorder, getExternalStoragePublicDirectory, and setOutpuFile gives me no clearer clue as to why this is happening. So just want to ask, anything come to mind why this error may occur?
My device information:
Samsung Galaxy Tab A (2019)
Android 9 (API 28)
I've also used permission_handler plugin to request permission for external storage.
Thank you very much.
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=333, result=-1, data=Intent { (has extras) }} to activity {com.isvisoft.flutter_screen_recording_example/com.isvisoft.flutter_screen_recording_example.MainActivity}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime(29458): at android.app.ActivityThread.deliverResults(ActivityThread.java:4845)
E/AndroidRuntime(29458): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886)
E/AndroidRuntime(29458): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
E/AndroidRuntime(29458): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(29458): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(29458): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
E/AndroidRuntime(29458): at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(29458): at android.os.Looper.loop(Looper.java:214)
E/AndroidRuntime(29458): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/AndroidRuntime(29458): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29458): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/AndroidRuntime(29458): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/AndroidRuntime(29458): Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime(29458): at android.os.Parcel.createException(Parcel.java:2071)
E/AndroidRuntime(29458): at android.os.Parcel.readException(Parcel.java:2039)
E/AndroidRuntime(29458): at android.os.Parcel.readException(Parcel.java:1987)
E/AndroidRuntime(29458): at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
E/AndroidRuntime(29458): at android.media.projection.MediaProjection.(MediaProjection.java:58)
E/AndroidRuntime(29458): at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:104)
E/AndroidRuntime(29458): at com.isvisoft.flutter_screen_recording.FlutterScreenRecordingPlugin.onActivityResult(FlutterScreenRecordingPlugin.kt:71)
E/AndroidRuntime(29458): at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:204)
E/AndroidRuntime(29458): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:131)
E/AndroidRuntime(29458): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:142)
E/AndroidRuntime(29458): at android.app.Activity.dispatchActivityResult(Activity.java:8110)
E/AndroidRuntime(29458): at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
E/AndroidRuntime(29458): ... 11 more
E/AndroidRuntime(29458): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(29458): at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:476)
E/AndroidRuntime(29458): at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:135)
E/AndroidRuntime(29458): at android.os.Binder.execTransactInternal(Binder.java:1021)
E/AndroidRuntime(29458): at android.os.Binder.execTransact(Binder.java:994)
E/AndroidRuntime(29458): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/AndroidRuntime(29458): Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime(29458): at android.os.Parcel.createException(Parcel.java:2071)
E/AndroidRuntime(29458): at android.os.Parcel.readException(Parcel.java:2039)
E/AndroidRuntime(29458): at android.os.Parcel.readException(Parcel.java:1987)
E/AndroidRuntime(29458): at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
E/AndroidRuntime(29458): at android.media.projection.MediaProjection.(MediaProjection.java:58)
E/AndroidRuntime(29458): at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:104)
E/AndroidRuntime(29458): at com.isvisoft.flutter_screen_recording.FlutterScreenRecordingPlugin.onActivityResult(FlutterScreenRecordingPlugin.kt:71)
E/AndroidRuntime(29458): at io.flutter.app.FlutterPluginRegistry.onActivityResult(FlutterPluginRegistry.java:204)
E/AndroidRuntime(29458): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:131)
E/AndroidRuntime(29458): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:142)
E/AndroidRuntime(29458): at android.app.Activity.dispatchActivityResult(Activity.java:8110)
E/AndroidRuntime(29458): at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
E/AndroidRuntime(29458): ... 11 more
when I press the button which named record screen,it happen below.
PS: my flutter is 1.17.1, my phone's android version is 10
I/System.out(28700): Scaled Density
I/System.out(28700): 3.0
I/System.out(28700): Original Resolution
I/System.out(28700): 1080 x 2208
I/System.out(28700): Calcule Resolution
I/System.out(28700): 939 x 1920
W/cording_example(28700): type=1400 audit(0.0:3036725): avc: granted { read write } for pid=28700 name="Title.mp4" dev="sdcardfs" ino=280996 scontext=u:r:untrusted_app_27:s0:c143,c259,c512,c768 tcontext=u:object_r:sdcardfs:s0 tclass=file
E/MediaRecorder(28700): prepare failed: -2147483648
D/--INIT-RECORDER(28700): prepare failed.
I/System.out(28700): Error startRecordScreen
I/System.out(28700): prepare failed.
D/HwFrameworkSecurityPartsFactory(28700): HwFrameworkSecurityPartsFactory in.
I/HwFrameworkSecurityPartsFactory(28700): add HwFrameworkSecurityPartsFactory to memory.
D/ZrHung.AppEyeUiProbe(28700): not watching, wait.
D/ZrHung.AppEyeUiProbe(28700): restart watching
Execution failed for task ':flutter_screen_recording:compileDebugKotlin'.
Hi!
Is there a way to add access to individual frames of the video in order to process them in some way? I also wouldn't necessarily need to save the video in any place so long as it was a stream of individual frames of the screen.
Thank you
I am using flutter_screen_recording: ^1.0.1 for flutter screen recording application , but i am getting the following exception by calling FlutterScreenRecording.startRecordScreen
, any help ?
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'void android.app.Activity.startActivityForResult(android.content.Intent, int, android.os.Bundle)' on a null object reference, null)
E/flutter (20318): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (20318): #1 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:321:33)
E/flutter (20318): <asynchronous suspension>
E/flutter (20318): #2 FlutterScreenRecording.startRecordScreen (package:flutter_screen_recording/flutter_screen_recording.dart:15:40)
E/flutter (20318): #3 _MyAppState.startScreenRecord (package:flutter_recording/main.dart:101:48)
E/flutter (20318): #4 _MyAppState.build.<anonymous closure> (package:flutter_recording/main.dart:90:15)
E/flutter (20318): #5 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14)
E/flutter (20318): #6 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:789:36)
E/flutter (20318): #7 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
E/flutter (20318): #8 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
E/flutter (20318): #9 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
E/flutter (20318): #10 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7)
E/flutter (20318): #11 PrimaryPointerGestureRecognizer.handleEvent (package:flutter/src/gestures/recognizer.dart:467:9)
E/flutter (20318): #12 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:76:12)
E/flutter (20318): #13 PointerRouter._dispatchEventToRoutes.<anonymous closure> (package:flutter/src/gestures/pointer_router.dart:117:9)
E/flutter (20318): #14 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:379:8)
E/flutter (20318): #15 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:115:18)
E/flutter (20318): #16 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:101:7)
E/flutter (20318): #17 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:218:19)
E/flutter (20318): #18 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:198:22)
E/flutter (20318): #19 GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:156:7)
E/flutter (20318): #20 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:102:7)
E/flutter (20318): #21 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:86:7)
E/flutter (20318): #22 _rootRunUnary (dart:async/zone.dart:1138:13)
E/flutter (20318): #23 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
E/flutter (20318): #24 _CustomZone.runUnaryGuarded (dart:async/zone.dart:933:7)
E/flutter (20318): #25 _invoke1 (dart:ui/hooks.dart:273:10)
E/flutter (20318): #26 _dispatchPointerDataPacket (dart:ui/hooks.dart:182:5)
When i install example of flutter_screen_recording. It automatically popup for permission. But when i request permission after adding dependency app does not popup for permission.
I check code for getting permission in example but didn't found any. I'm wondering how the example get permission.
I know "Flutter_Screen_Recorder do not request permissions necessary.".
Should it work on simulator ?
I trued several devices and it loses connection on startup.
When I use startRecordScreen, app crashes and I get an error :
java.lang.NoSuchMethodError: No virtual method onActivityResult(ILandroid/content/Intent;Landroid/app/Activity;)V in class Lcom/hbisoft/hbrecorder/HBRecorder; or its super classes (declaration of 'com.hbisoft.hbrecorder.HBRecorder' appears in /data/app/com.....
I'm using the exact same code as in the example given
Hi. I want to test screen recording but I got this error.
I put exactly the same as Readme file and checked storage permission with permission handler.
I/MediaRecorderJNI(14754): setup
I/MediaRecorderJNI(14754): setVideoSource(2)
I/MediaRecorderJNI(14754): setVideoEncoder(2)
I/System.out(14754): 1280 720
I/MediaRecorderJNI(14754): setVideoSize(1280, 720)
I/MediaRecorderJNI(14754): setVideoFrameRate(30)
I/System.out(14754): file --- /storage/emulated/0/DCIM/test.mp4
I/MediaRecorderJNI(14754): setParameter()
I/System.out(14754): Error onMethodCall startRecordScreen
I/System.out(14754): /storage/emulated/0/DCIM/test.mp4: open failed: EACCES (Permission denied)
I am trying to use flutter_screen_recording 1.0.3 plugin for screen recording ,
but it is generating empty video file .
Working on plugin is still in progress or there is any issue that is causing this problem ?
It would be really nice of this used the new platform interface design so that we could add support for web etc. I'm happy to write the web integration since most browsers now support this once it's in platform interface design pattern.
Need to be a MediaProjection service for Android 10.
Plugin needs to be upgraded to support Android 10.
Thanks
reason :
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriter finishWritingWithCompletionHandler:] Cannot call method when status is 1'
that's ok before delete it.
here is the code create file.
_startRecordScreen() async {
screenRecordStart = await FlutterScreenRecording.startRecordScreen(screenFilename);
_timing();
}
_stopRecordScreen() async {
screenAbsFilePath = await FlutterScreenRecording.stopRecordScreen;
print('$screenAbsFilePath');
}
and when i try to delete it use file api in real phone.
File screenFile = File(face.filePath);
await screenFile.delete();
i would get this error
FileSystemException: Cannot delete file, path = '/storage/emulated/0/DCIM/8d2b429d-d8c7-424f-b668-8ad20d8cd5c2.mp4' (OS Error: Owner died, errno = 130)
what should i do ?
On both platforms record audio is being recorded in low quality.
In Android I fixed it by using:
mMediaRecorder?.setAudioSource(MediaRecorder.AudioSource.VOICE_RECOGNITION); mMediaRecorder?.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mMediaRecorder?.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); mMediaRecorder?.setAudioEncodingBitRate(16*44100); mMediaRecorder?.setAudioSamplingRate(44100);
iOS is still low quality.
The simple test it to record using the device's Camera app, and compare the quality of the voice.
In iOS the app pause recording when the app goes in the background and then back to the app it continues recording
when using landscape orientation, the phone is being recorded in a vertical resolution video, which causes the output to be "squashed" into it vertically.
N/A
when run app,it can not record when the app in backgroud
I have web code implemented. It depends on the Platform Interface code pull request I did before.
The pull request is here: #30
There are no tests at this time.
although i gave audio permission to app, still no luck in recording device voice, only able to record video
Andriod Q, need a Foreground service request now. Please make this update. I'm about to publish my application to playstore but due to this issue, I'm not able to.
Exception in Android Q (10)
compileSdkVersion 29
targetSdkVersion 29
I know after downgrading to compileSdkVersion 28. The app will work but then I will not be able to upload it to the play store.
D/AndroidRuntime( 5005): Shutting down VM
E/AndroidRuntime( 5005): FATAL EXCEPTION: main
E/AndroidRuntime( 5005): Process: com.example.screenrecordtest, PID: 5005
E/AndroidRuntime( 5005): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=333, result=-1, data=Intent { (has extras) }} to activity {com.example.screenrecordtest/com.example.screenrecordtest.MainActivity}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime( 5005): at android.app.ActivityThread.deliverResults(ActivityThread.java:5015)
E/AndroidRuntime( 5005): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5056)
E/AndroidRuntime( 5005): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
E/AndroidRuntime( 5005): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime( 5005): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime( 5005): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime( 5005): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 5005): at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime( 5005): at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime( 5005): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 5005): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime( 5005): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime( 5005): Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
E/AndroidRuntime( 5005): at android.os.Parcel.createExceptionOrNull(Parcel.java:2373)
E/AndroidRuntime( 5005): at android.os.Parcel.createException(Parcel.java:2357)
E/AndroidRuntime( 5005): at android.os.Parcel.readException(Parcel.java:2340)
E/AndroidRuntime( 5005): at android.os.Parcel.readException(Parcel.java:2282)
E/AndroidRuntime( 5005): at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:231)
E/AndroidRuntime( 5005): at android.media.projection.MediaProjection.<init>(MediaProjection.java:59)
E/AndroidRuntime( 5005): at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:119)
E/AndroidRuntime( 5005): at com.isvisoft.flutter_screen_recording.FlutterScreenRecordingPlugin.onActivityResult(FlutterScreenRecordingPlugin.kt:66)
E/AndroidRuntime( 5005): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:739)
E/AndroidRuntime( 5005): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:426)
E/AndroidRuntime( 5005): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:652)
E/AndroidRuntime( 5005): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:618)
E/AndroidRuntime( 5005): at android.app.Activity.dispatchActivityResult(Activity.java:8310)
E/AndroidRuntime( 5005): at android.app.ActivityThread.deliverResults(ActivityThread.java:5008)
E/AndroidRuntime( 5005): ... 11 more
E/AndroidRuntime( 5005): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime( 5005): at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:479)
E/AndroidRuntime( 5005): at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:135)
E/AndroidRuntime( 5005): at android.os.Binder.execTransactInternal(Binder.java:1154)
E/AndroidRuntime( 5005): at android.os.Binder.execTransact(Binder.java:1123)
E/AndroidRuntime( 5005):
I/Process ( 5005): Sending signal. PID: 5005 SIG: 9
Hello guys .
This plugin is recording video successfully . But it is not able to record audio. Can you please add this feature?
Thanks
Hello Guys,
Thanks for this plugin.
I updated Gradle to new version and now, this issue appears :
"execution failed for task ':flutter_screen_recording:compiledebugkotlin'".
I tried many solutions but nothing works :
After 1 day on it, i decided to cut part of code. But i really want to use it.
What can i do ? or What can you do (about updating package with new android updates) ?
Thanks for help.
Have a nice day,
Guillaume
Getting File format isn't supported or files are corrupted. when opening in any media player.
Example app crashes on iOS.
Steps to reproduce:
The issue was observed on physical device (iPhone 7 plus running iOS 13.5.1) and on a simulator.
Hello everyone,
The issue right now is so that when I start to record, and stop it, it works, it creates the screen record and the video, but it does NOT record the full screen of it.
Click here for a streamable video link from stramable.com
Since in the plugin, right now, it does not say that i can set video screen size, its a bit strange because it records only top of the app and not the whole full screen.
What i also realized, it recorded only a fraction of it and not whole 15 seconds that i did.
Let me know what I am missing, Thank you.
this is the code:
` startScreenRecord(bool audio) async {
print('test');
bool start = false;
await Future.delayed(const Duration(milliseconds: 1000));
if (audio) {
print('test2');
start = await FlutterScreenRecording.startRecordScreenAndAudio(
"Title" + _time.toString(),
titleNotification: "dsffad",
messageNotification: "sdffd");
} else {
print('test3');
start = await FlutterScreenRecording.startRecordScreen("Title2",
titleNotification: "dsffad", messageNotification: "sdffd");
}
if (start) {
print('start');
setState(() => recording = !recording);
}
return start;
} stopScreenRecord() async { print('stop'); String path = await FlutterScreenRecording.stopRecordScreen; setState(() { print('setState'); recording = !recording; }); print("Opening video"); print(path); OpenFile.open(path); } }
Thanks for this useful plugin. I'm running it on the Android Emulator built for Pixel 3a and Android api 29, i.e. Android 10. It works fine except that a warning dialog always appears. The title is "Exposing sensitive info during casting/recording". Is there a way to suppress that programmatically?
Edit: The same thing happens on a Samsung Galaxy S9 running Android 10. I was not able to find a place to turn off this warning in Settings. I'd like to be able to control it from an app.
Hi,
is there any way to record screen even app is in the background?
record other apps, like default ios screen recorder
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.