Closed sagrawal31 closed 4 years ago
Hi @sagrawal31, checking it
Please take a look at v 0.82.3
.
FYI: we have removed ability to configure audio encoder. Since it was not the issue we don't plan to allow it for now.
Thank you @3akat for releasing a new version. I'll try it out and will let you know that.
Hi @3akat this isn't working. It's throwing some exception:
7100 17100 E AndroidRuntime: at android.app.servertransaction.PauseActivityItem.execute(PauseActivityItem.java:45)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1957)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7099)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.PowerManager$WakeLock.release()' on a null object reference
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at com.ziggeo.androidsdk.widgets.cameraview.CameraView.removeKeepScreenOn(CameraView.java:669)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at com.ziggeo.androidsdk.widgets.cameraview.CameraView.stop(CameraView.java:298)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at com.ziggeo.androidsdk.ui.fragments.CameraRecorderFragment.onPause(CameraRecorderFragment.java:280)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.Fragment.performPause(Fragment.java:2645)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1512)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentManagerImpl.dispatchPause(FragmentManager.java:3245)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentController.dispatchPause(FragmentController.java:234)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at androidx.fragment.app.FragmentActivity.onPause(FragmentActivity.java:476)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.Activity.performPause(Activity.java:7646)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1469)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: at android.app.ActivityThread.performPauseActivityIfNeeded(ActivityThread.java:4281)
03-09 15:53:16.590 17100 17100 E AndroidRuntime: ... 12 more
you're getting this when try to stop the recording, right?
No. This is crashing as soon as I'm launching the recorder.
Weird. I was able to catch this two times but the issue disappeared after a clean build (build
folder delete). Can you please try it?
@3akat I have already tried cleaning the app multiple times and also tried to delete the build
folder (after your comment) but still getting that exception.
Any update here @3akat
Can't reproduce the issue. Will do some crash-prevent fixes and will share a new version to try
Okay. I'll be waiting.
Please take a look at 0.82.4
Oh! This also worked just fine. And the build issue is also gone. Great job Ziggeo team 👏
By the way, looks like the wake lock is not being cleared when the recording is done. I killed the app and the screen was on until I manually locked the screen (and it got reset afterwards).
This is fine for me but might not be okay for others. So it's up to you if you want to resolve this now or later in future.
Hm... I actually revoke the wakelock when the recording is stopped. I believe you've killed the app without stopping it, right? If so I'll add the fix for that case
No, I killed the app after the recording was done and it was showing "Uploading" in the notification.
Roger that, will check, thanks for sharing
I'm using
v0.82.2
of the Android SDK on an Android 10. When the recording is running and we do not interact with the screen, the screen goes to sleep (as set in the OS settings - defaulted to 30 seconds). And as soon as the screen goes to sleep, we can not restore the recording and the app freezes with an exception:How can we prevent OS from sleeping while the recording is on? I was thinking that this would be handled by OS itself.
By the way, I tried to call
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
but that doesn't help. https://developer.android.com/training/scheduling/wakelock