Closed pourya0111 closed 6 years ago
Hello,
please provide log to know the exact cause of the crash. Use adb logcat SCREENRECORDER_LOG:E *:S
to get the log of the app alone.
It's possibility this issue: https://gitlab.com/fdroid/fdroiddata/issues/979
my bad that was a issue from my side not the app sorry it fixed
now i have a question and hope you can help me with i changed some lines of your code to start it in foreground and created a notification for it with pendingintent its working perfectly however its crashing after one record complete with error nullpointer
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.display.VirtualDisplay android.media.projection.MediaProjection.createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay$Callback, android.os.Handler)' on a null object reference
im recording when stop and try to record again it gives this error and crash any idea how to fix it?
If you mean to say you try to record again after stopping the previous recording successfully, the log says you have not initialized the virtualDisplay after destroying the previous one (its destroyed as soon as you stop the recording. Check destroyMediaProjection()
to see how the VirtualDisplay is released.
To fix, you will have to start right from obtaining permission for screencapturing, creating MediaProjection instance etc. I'm not sure what you want to achieve or what you are doing so. I only speak of my assumption.
i've done it some way tricky all i wanted was to start,stop even when app is completley close after 3 hardwork days finally it,s here
That's nice to hear. Closing the issue now.
first attemp to open app cause crash and never be load into app