Code Monkey home page Code Monkey logo

hbrecorder's People

Contributors

dhina17 avatar hbisoft avatar tfrysinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hbrecorder's Issues

Crash onClick of Start recording

Hi @HBiSoft ,

I executed the HBRecorder Example, on click of start button, the app crashes (irrespective of customSettings on/off).

  • Device : Moto G7 Power
  • Operation System : Android 9 (Pie)
  • All permissions are given

So in logs I can see 2 exceptions:

  1. FileNotFoundException
  2. IllegalStateException : failed to get the surface

Following are the logs:

2020-02-20 14:54:59.622 17493-17493/com.hbisoft.hbrecorderexample E/MediaRecorder: SurfaceMediaSource could not be initialized!
2020-02-20 14:54:59.623 17493-17493/com.hbisoft.hbrecorderexample E/MediaRecorder: start called in an invalid state: 4
2020-02-20 14:54:59.626 17493-17493/com.hbisoft.hbrecorderexample E/HBRecorderOnError: java.io.FileNotFoundException: /storage/emulated/0/Movies/HBRecorder/HD2020-02-20-14-54-59.mp4: open failed: ENOENT (No such file or directory)
        at libcore.io.IoBridge.open(IoBridge.java:485)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:288)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:151)
        at android.media.MediaRecorder.prepare(MediaRecorder.java:959)
        at com.hbisoft.hbrecorder.ScreenRecordService.initRecorder(ScreenRecordService.java:385)
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:166)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3884)
        at android.app.ActivityThread.access$1700(ActivityThread.java:213)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1847)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6923)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
     Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
        at libcore.io.Linux.open(Native Method)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:210)
        at libcore.io.IoBridge.open(IoBridge.java:471)
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:288) 
        at java.io.RandomAccessFile.<init>(RandomAccessFile.java:151) 
        at android.media.MediaRecorder.prepare(MediaRecorder.java:959) 
        at com.hbisoft.hbrecorder.ScreenRecordService.initRecorder(ScreenRecordService.java:385) 
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:166) 
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3884) 
        at android.app.ActivityThread.access$1700(ActivityThread.java:213) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1847) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6923) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870) 
2020-02-20 14:54:59.628 17493-17493/com.hbisoft.hbrecorderexample E/HBRecorderOnError: java.lang.IllegalStateException: failed to get surface
        at android.media.MediaRecorder.getSurface(Native Method)
        at com.hbisoft.hbrecorder.ScreenRecordService.initVirtualDisplay(ScreenRecordService.java:392)
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:186)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3884)
        at android.app.ActivityThread.access$1700(ActivityThread.java:213)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1847)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6923)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
2020-02-20 14:54:59.629 17493-17493/com.hbisoft.hbrecorderexample E/HBRecorderOnError: java.lang.IllegalStateException
        at android.media.MediaRecorder.start(Native Method)
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:206)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3884)
        at android.app.ActivityThread.access$1700(ActivityThread.java:213)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1847)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6923)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)

How to pause the recording?

Like I want to pause the screen recording while it is recording and restart it again from there? How I can do it?

RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService

ScreenRecorderService crashed in production environment. Hope this crash can be avoided with a simple NULL check. I'd appreciate any help.

Describe the bug
ScreenRecorderService within the HBRecorder crashed on hbRecorder.stopScreenRecording()

Log

uncaughtException:
Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@bf716e7: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference

StackTrace:
java.lang.RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@bf716e7: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference

StackTraceDetails:
java.lang.RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@bf716e7: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4583)
        at android.app.ActivityThread.access$2100(ActivityThread.java:274)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2139)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:237)
        at android.app.ActivityThread.main(ActivityThread.java:8167)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
        at com.hbisoft.hbrecorder.ScreenRecordService.f(SourceFile:7)
        at com.hbisoft.hbrecorder.ScreenRecordService.onDestroy(SourceFile:2)
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4563)

Can it be reproduced in demo app
This crash is reported in production environment.

HBRecorder version
HBRecorder:0.1.14

Device information
Samsung SM-A715F
SDK version 29

HBRecorderOnError:: errorCode: 100 reason: 268435556

HBRecorder works fine on Android emulators and on my 3 physical devices. However, on one of my device the screen recorder stops immediately after I start recording. I am getting callback on HBRecorderOnError with errorCode: 100 and reason: 268435556

Both the "High Definition" and "Standard Definition" option is producing same error on the device.

Yes, this error is reproduced in demo app.

HBRecorder version
HBRecorder:0.1.14

Device information
LenovoTB3-X70L( LENOVO Lenovo TB3-X70L) Android 23

The demo app is showing toast HBRecorderOnError as soon as the start button is clicked.
HBRecorder Screenshot.

I'd appreciate any help.

"Unable to screen record" toast

After implementing the class and starting a screen recording, the app kicks out of my recording screen and a toast message comes up with "Unable to screen record". What could be causing this?

20200904_143441

Crashing on stop

Description
The app is crashing from your library. The crashlog is from Firebase Crashlytics

Log

Fatal Exception: java.lang.RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@bf32d6: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
       at android.app.ActivityThread.handleStopService(ActivityThread.java:4137)
       at android.app.ActivityThread.access$1900(ActivityThread.java:220)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1897)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7397)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

It cannot be reproduced, because I don't have those devices.

HBRecorder version: 0.1.14

Device information
Nokia N9 - Android SDK 28

Background service

Hi,
First, I would like to say Awesome Thanks to the developper of this crazy simple library.
I just would like to know if there is a way to use the HBRecorder inside a service.
I know that the screen recording could only be asked from an activity but have you any idea about how to do that like a transparent activity or something similar?
Sincerely,
Charles

Mic Already in use.

i want to record my video call but exception occurred that mic is already in use. any suggestion ?

HBRecorder recording stucks on API equal to or less then 23 (Android Level equal to or below then 6)

Hi, I am working on API level 23 (Android version 6.0)
I have to record screen and also take screenshot on the same activity/screen (having exoplayer for playing video).
when I only record screen or only take screenshot then everything is working perfectly
but
when I start screen recording and while in screen recording I take screenshot then after that the screen recording stucks,
note that for screenshot I am using media projection with different instance and API level higher then 23 are working perfectly, I am facing issue only in 23 and less than 23.
Also, I am attaching screenshot for better understanding and if you still need more information then ask me..
In first screenshot I am just recording screen and everything is perfect
In second screenshot when I take screenshot then dialog appears and when I select start now then screen recording stucks as you can see in third screenshot

Screenshot_2020-11-30-16-18-52

Screenshot_2020-11-30-16-19-03

Screenshot_2020-11-30-16-19-15

java.lang.IllegalStateException: failed to get surface

This happens when I set the outputPath = getFilesDir() + "/demoVideos"

java.lang.RuntimeException: Unable to start service com.hbisoft.hbrecorder.ScreenRecordService@72a1038 with Intent { cmp=com.app.guarddoor/com.hbisoft.hbrecorder.ScreenRecordService (has extras) }: java.lang.IllegalStateException: failed to get surface at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3713) at android.app.ActivityThread.access$1600(ActivityThread.java:202) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:198) at android.app.ActivityThread.main(ActivityThread.java:6729) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: java.lang.IllegalStateException: failed to get surface at android.media.MediaRecorder.getSurface(Native Method) at com.hbisoft.hbrecorder.ScreenRecordService.createVirtualDisplay(ScreenRecordService.java:224) at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:146) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3694) at android.app.ActivityThread.access$1600(ActivityThread.java:202)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:198)  at android.app.ActivityThread.main(ActivityThread.java:6729)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 

Add Android Q support

Hey,
Great library!

There is an issue with:
getExternalStoragePublicDirectory() is no longer supported starting Android Q and forward.

Can you add a way to do this? I suggest to use:

      val resolver = context.contentResolver
      val contentValues = ContentValues().apply {
        put(MediaStore.MediaColumns.DISPLAY_NAME, "CuteKitten001")
        put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg")
        put(MediaStore.MediaColumns.RELATIVE_PATH, "DCIM/PerracoLabs")
      }

      val uri = resolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues)

      resolver.openOutputStream(uri).use {
        // TODO something with the stream
      

But probably with the props the user set.

The answer is from here:
https://stackoverflow.com/questions/20523658/how-to-create-application-specific-folder-in-android-gallery

I am unable to import dependency

Describe the bug
I am unable to import HBRecorder:0.1.15.

Log

Failed to resolve: com.github.HBiSoft:HBRecorder:0.1.15
Show in Project Structure dialog
Affected Modules: app

Can it be reproduced in demo app
no

HBRecorder version
0.1.15

Device information
defaultConfig
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

HBRecorderOnError see log

HBRecorderOnError: 268435556

When i pressing start button its automatically stop and toast message is showing HBRecorderOnError see log and log error is 268435556. I tested sample app but same error. In HBRecorder class there is a exception on startService method. My device is 1820 and version 8.1.0 API level 27

Audio not recorded when i use it during call android 10

Before filing a bug:

  • Have a look at previously asked questions to see if your question has been asked before.
  • Properly format your question.
  • All questions should be asked in English.
  • Questions that are not related to the project will be deleted
  • Delete all the above before posting

Could not start video recording...

Hi, I was testing your very interesting library with a simple code provided in the README :

public class ScreenRecorder extends AppCompatActivity implements HBRecorderListener {

    private static final int SCREEN_RECORD_REQUEST_CODE = 12345;
    HBRecorder hbRecorder;

    Button button10, button11;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.screen_recorder);

        button10 = (Button) findViewById(R.id.button10);
        button11 = (Button) findViewById(R.id.button11);


        button10.setOnClickListener(new View.OnClickListener() {
            @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
            @Override
            public void onClick(View v) {
                startRecordingScreen();
            }
        });

        button11.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                hbRecorder.stopScreenRecording();
            }
        });

        //Init HBRecorder
        hbRecorder = new HBRecorder(this, this);
    }

    @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
    private void startRecordingScreen() {
        MediaProjectionManager mediaProjectionManager = (MediaProjectionManager) getSystemService(Context.MEDIA_PROJECTION_SERVICE);
        Intent permissionIntent = mediaProjectionManager != null ? mediaProjectionManager.createScreenCaptureIntent() : null;
        startActivityForResult(permissionIntent, SCREEN_RECORD_REQUEST_CODE);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if (requestCode == SCREEN_RECORD_REQUEST_CODE) {
            if (resultCode == RESULT_OK) {
                Toast.makeText(this, "Authorization granted", Toast.LENGTH_LONG).show();
                //Start screen recording
                hbRecorder.startScreenRecording(data, resultCode, this);

            }
        }
    }

    @Override
    public void HBRecorderOnComplete() {

    }

    @Override
    public void HBRecorderOnError(int errorCode, String reason) {

    }
}

But when I try to start the recording, I see the Recording Prompt message from Android, I click on Start Now and the app crash.

On the Log I can see the following errors :

2020-05-03 22:26:19.854 23343-23343/fr.gooddev.totalspy E/MediaRecorder: SurfaceMediaSource could not be initialized!
2020-05-03 22:26:19.855 23343-23343/fr.gooddev.totalspy E/MediaRecorder: start called in an invalid state: 4
2020-05-03 22:26:19.902 23343-23343/fr.gooddev.totalspy D/AndroidRuntime: Shutting down VM
2020-05-03 22:26:19.903 23343-23343/fr.gooddev.totalspy E/AndroidRuntime: FATAL EXCEPTION: main
    Process: fr.gooddev.totalspy, PID: 23343
    java.lang.RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@c2e5f75: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4136)
        at android.app.ActivityThread.access$1900(ActivityThread.java:219)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1896)
        at android.os.Handler.dispatchMessage(Handler.java:107)
        at android.os.Looper.loop(Looper.java:214)
        at android.app.ActivityThread.main(ActivityThread.java:7356)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
     Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
        at com.hbisoft.hbrecorder.ScreenRecordService.resetAll(ScreenRecordService.java:421)
        at com.hbisoft.hbrecorder.ScreenRecordService.onDestroy(ScreenRecordService.java:407)
        at android.app.ActivityThread.handleStopService(ActivityThread.java:4116)
        at android.app.ActivityThread.access$1900(ActivityThread.java:219) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1896) 
        at android.os.Handler.dispatchMessage(Handler.java:107) 
        at android.os.Looper.loop(Looper.java:214) 
        at android.app.ActivityThread.main(ActivityThread.java:7356) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 

I am using the last version of your Library because I just downloaded it from Gradle.

I tried on an Android 10 SDK 29 on an emulator of a Google Pixel 3 XL.

If you need more infos, I can provide it.

Sincerely,
Charles BEL

Stop record cause crash

When invoke to .stopScreenRecording(data) cause this crash. Attach Android Studio console
result:

traza

Any idea?
Thank you very much

Project Build with android 28

Hi,
I am getting error while building app with android 28? Can you please assist.
Let me elaborate.

I Set the TargetSDK and CompileSDK to version 28
I clean the Project
Run the Rebuild

getting below errors

\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:16: AAPT: error: attribute android:requestLegacyExternalStorage not found.

app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:34: AAPT: error: attribute android:foregroundServiceType not found.

let me know if still need to provide more details.

Get Continue Recording Without Permisison ?

device-copy

can i start recording without permission popup in app,my point is can i get store intent in app. i check in android 10 device that prompt every time when i start recording.

Thanks.

HBRecorderOnError:: errorCode: 100 reason: java.lang.IllegalStateException

Got HBRecorderOnError callback on first call to HBRecorder startScreenRecording on one device. This is a production issue and I don't know if any other recorder was active at that time (also don't know if that matters). Not sure if this a HBRecorder bug or, this needs to handled for retry. I'd appreciate any help.

Describe the bug
Got this error HBRecorderOnError:: errorCode: 100 reason: java.lang.IllegalStateException on first hbRecorder.startScreenRecording call after install.

Log

HBRecorderOnError:: errorCode: 100 reason: java.lang.IllegalStateException
        at android.media.MediaRecorder.start(Native Method)
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(SourceFile:83)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3672)
        at android.app.ActivityThread.-wrap21(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1825)
        at android.os.Handler.dispatchMessage(Handler.java:110)
        at android.os.Looper.loop(Looper.java:232)
        at android.app.ActivityThread.main(ActivityThread.java:6806)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1103)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)

Can it be reproduced in demo app
This is a production issue - no access to the physical device.

HBRecorder version
HBRecorder:0.1.14

Device information
OPPO CPH1729
SDK version 25

how i can install it as system app ?

hello i have device that running lineage os 17.1 i would like to replace the stock recorder app with this app i have magisk root and twrp if thats help the reason i would install it as system app are because theres some apps doesn't updated long time ago and you can't record them with internal audio if you installed the apk as user app

Stop application when start recording

Describe the bug
When click on start button show me force close error

Log

java.lang.RuntimeException: Unable to start service com.hbisoft.hbrecorder.ScreenRecordService@dc8478b with Intent { cmp=com.hbisoft.hbrecorderexample/com.hbisoft.hbrecorder.ScreenRecordService (has extras) }: java.lang.IllegalStateException: failed to get surface
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3045)
        at android.app.ActivityThread.access$2200(ActivityThread.java:157)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1454)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:148)
        at android.app.ActivityThread.main(ActivityThread.java:5530)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:733)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:623)
     Caused by: java.lang.IllegalStateException: failed to get surface
        at android.media.MediaRecorder.getSurface(Native Method)
        at com.hbisoft.hbrecorder.ScreenRecordService.createVirtualDisplay(ScreenRecordService.java:226)
        at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:148)
        at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3028)

HBRecorder version
for example 1.0.1

Device information

  • LG K430
  • Android 6

HBRecorder error android R (Lag MediaRecorder stop Runtimeexception)

Before filing a bug:

  • Please fill in all the information below.
  • Have a look at previously asked questions to see if your issue has been resolved.
  • Properly format your issue.
  • All issues should be asked in English.
  • Delete all the above before posting your issue

Describe the bug
A clear and concise description of what the bug is.

Log
Please provide a well formatted bug report (by adding 4 spaces before the log)

Can it be reproduced in demo app
Yes or no

HBRecorder version
for example 1.0.1

Device information

  • Make/model
  • SDK version

Screenshots
If applicable, add screenshots to help explain your problem.

how can i crop video which is captured by recorder ?

i am trying to record a video in cropped screen but not able to do so far.
so is there any idea or code which can be implemented so that capture screen can be cropped while recording.

i have changed code as below

mMediaRecorder.setVideoSize(mScreenWidth, mScreenHeight);

but not get desirable output.

so if there any solution please tell me.

Streaming

i come here from : https://morioh.com/p/11b23bb6f978

i am wondering can we use this lib to share screen to twitch for example ? (to stream video exactly)
as screen recording works perfectly thanks a lot ;)

When zoom meeting is running if i start recording i am getting error

Describe the bug
When zoom meeting is running if i start recording i am getting error
Log
2020-07-17 21:15:34.303 5997-5997/com.hbisoft.hbrecorderexample E/MediaRecorder: start failed: -38
2020-07-17 21:15:34.328 5997-5997/com.hbisoft.hbrecorderexample E/CALLED: CALLED
2020-07-17 21:15:34.369 5997-5997/com.hbisoft.hbrecorderexample E/HBRecorderOnError: java.lang.IllegalStateException
at android.media.MediaRecorder.start(Native Method)
at com.hbisoft.hbrecorder.ScreenRecordService.onStartCommand(ScreenRecordService.java:231)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:3668)
at android.app.ActivityThread.access$1600(ActivityThread.java:200)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1682)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6692)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2020-07-17 21:15:34.374 5997-5997/com.hbisoft.hbrecorderexample E/CALLED: CALLED
2020-07-17 21:15:34.384 5997-5997/com.hbisoft.hbrecorderexample E/HBRecorderOnError: 268435556

Can it be reproduced in demo app
Yes

HBRecorder version
for example 1.0

Device information

  • Make/model ASUS
  • SDK version 29

Screenshots
If applicable, add screenshots to help explain your problem.

Thanks
Ramesh

Always fill in the issue template

It is not possible to predict the cause of an error without a log, knowing your environment, understanding what you are trying to achieve or which steps you took.

So, please fill in the issue template when creating an issue.

Issues that do not fill out the issue template fields will be closed immediately until the fields are filled in.

On start recording it is giving a 100 error code on my vivo v11

I am trying to fix an issue where when I start recording it is giving me an error code 100 inside HBRecorderOnError

I am not able to get the as when it doesnt show anything in logs when I try to attach it to the app's process.

Yes it can be on my vivo v11

HBRecorder version
0.1.7

Device information

  • Vivo v11
  • 28

HBRecorderOnComplete is called twice for me

HBRecorderOnComplete is called twice for me

I am stopping the recording using 'stopScreenRecording()' api and not the 'Stop recording' button in the notification area. For some unknown reason, HBRecorderOnComplete is called twice. I tried tapping the button in the notification area and the behaviour is the same. HBRecorderOnComplete is called twice. Has anyone else seen the same issue?

Stack for first call is -
callback:308, HBRecorder
run:73, FileObserver$1
handleCallback:883, Handler
dispatchMessage:100, Handler
loop:214, Looper
main:7697, ActivityThread

Stack for second call is -
onReceiveResult:290, HBRecorder$1
run:50, ResultReceiver$MyRunnable
handleCallback:883, Handler
dispatchMessage:100, Handler
loop:214, Looper
main:7697, ActivityThread

I have followed the instructions to integrate the library from here.

Showing error "Access denied finding property "camera.aux.packagelist"

Error occurred in some device called "Hbrecords: See Log" when click start button.:

Error log:

2020-07-20 13:22:52.884 10694-10694/com.myapp E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false
2020-07-20 13:22:55.377 10694-10694/com.myapp E/libc: Access denied finding property "camera.aux.packagelist"
2020-07-20 13:22:55.377 10694-10694/com.myapp E/libc: Access denied finding property "camera.aux.packagelist"
2020-07-20 13:22:55.380 10694-10694/com.myapp E/libc: Access denied finding property "camera.aux.packagelist"
2020-07-20 13:22:55.380 10694-10694/com.myapp E/libc: Access denied finding property "camera.aux.packagelist"
2020-07-20 13:22:55.468 10694-10694/com.myapp E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false
2020-07-20 13:22:56.174 10694-10694/com.myapp E/CALLED: CALLED
2020-07-20 13:22:56.200 10694-10694/com.myapp E/HBRecorderOnErrorr: 268435556
2020-07-20 13:22:56.261 10694-10694/com.myapp E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false
2020-07-20 13:23:53.522 10694-10694/.myapp E/GraphicExt: GraphicExtModuleLoader::CreateGraphicExtInstance false

I tried some steps by searching internet:

  1. added " " in menifest.
  2. Tried set true and false both in menifest for android:hardwareAccelerated="true"
  3. Set hbRecorder.setAudioSource("VOICE_RECOGNITION"); before start recording.

All above solution doesn't work. Please help.

Screen record when the camera is in use

I have an app that supports video chat; so technically its already using the camera. Recording screen when the video chat is up triggers HBRecorderOnError. Is this doable?

Add android:foregroundServiceType="mediaProjection" Service tag under manifest for Android Pie and Android Q support also android:requestLegacyExternalStorage="true" in application tag for android 10 storage permission.

Before filing a bug:

  • Please fill in all the information below.
  • Have a look at previously asked questions to see if your issue has been resolved.
  • Properly format your issue.
  • All issues should be asked in English.
  • Delete all the above before posting your issue

Describe the bug
A clear and concise description of what the bug is.

Log
Please provide a well formatted bug report (by adding 4 spaces before the log)

Can it be reproduced in demo app
Yes or no

HBRecorder version
for example 1.0.1

Device information

  • Make/model
  • SDK version

Screenshots
If applicable, add screenshots to help explain your problem.

Display a notification while recording the screen

Thanks @HBiSoft for this wonderful library.
During recording a notification is not shown despite me having provided the notification icon and the title as well as the Notification message. Where might I be going wrong.

NOTE: The app is recording the video and saving it to the gallery but not displaying the notification.

Add Remote_Submix support

Is your feature request related to a problem? Please describe.
I'm testing this app on android-x86 7.1 it's working good so far but i want to use the remote_submix as audio source so that i can record the internal audio. my custom android x86 build does support this feature but only app i can't find use this feature is ScreenCam Screen recorder but it's no longer under development & have many bugs with android x86.
Describe the solution you'd like
if you can add r_submix support like screencam it'll be great.
https://gitlab.com/vijai/screenrecorder
thanks

Audio not recording in android 10 when i set audio source to 'DEFAULT'

Before filing a bug:

  • Please fill in all the information below.
  • Have a look at previously asked questions to see if your issue has been resolved.
  • Properly format your issue.
  • All issues should be asked in English.
  • Delete all the above before posting your issue

Describe the bug
A clear and concise description of what the bug is.

Log
Please provide a well formatted bug report (by adding 4 spaces before the log)

Can it be reproduced in demo app
Yes or no

HBRecorder version
for example 1.0.1

Device information

  • Make/model
  • SDK version

Screenshots
If applicable, add screenshots to help explain your problem.

Requesting Features

Hello Sir!
Please can you add initial count down timer, orientation mode and pop-up window floating action buttons in this.
Thanks in Advance.

App is crashing on stop.

Description
The app is crashing from your library. The crashlog is from Firebase Crashlytics

Log

Fatal Exception: java.lang.RuntimeException: Unable to stop service com.hbisoft.hbrecorder.ScreenRecordService@bf32d6: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.media.projection.MediaProjection.stop()' on a null object reference
       at android.app.ActivityThread.handleStopService(ActivityThread.java:4137)
       at android.app.ActivityThread.access$1900(ActivityThread.java:220)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1897)
       at android.os.Handler.dispatchMessage(Handler.java:107)
       at android.os.Looper.loop(Looper.java:214)
       at android.app.ActivityThread.main(ActivityThread.java:7397)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)

It cannot be reproduced, because I don't have those devices.

HBRecorder version: 0.1.14

Device information
Nokia N9 - Android SDK 28

No screenshots

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.