Automattic / stories-android

Loop concept app - WP Stories library
GNU General Public License v2.0
20 stars 6 forks source link

Update cameraX to beta version #272

Open mzorz opened 4 years ago

mzorz commented 4 years ago

CameraX has been promoted to beta yesterday (Feb 26th) (1.0.0-beta01) https://developer.android.com/jetpack/androidx/releases/camera

We need to make the necessary changes to integrate that one - and hopefully it'll fix some of the camera issues we've observed while the library was still in alpha.

EDIT: also remember to remove the workarounds and patches introduced like calling setTargetAspectRatioCustom to circumvent problems found in alpha06

cc @aforcier

mzorz commented 4 years ago

EDIT: also remember to remove the workarounds and patches introduced like calling setTargetAspectRatioCustom to circumvent problems found in alpha06

aforcier commented 4 years ago

This may resolve https://github.com/Automattic/stories-android/issues/430 and #427.

designsimply commented 3 years ago

On 2021-01-11, someone reported a crash on startup happening for the WordPress for Android app v16.4 on their Samsung Galaxy Tab A 10.5 device and the crash appears to be happening when when the ContentProviders get registered on startup and it was suggested (in p4a5px-2Ht-p2#comment-11785) that updating the CameraX library may fix the problem. Here are the details from the user report for reference:

Original user report:

For many months now my Wordpress app just doesn’t open at all. I’ve tried Beta and the normal version and it just crashes on start up. It works on my iPhone but not on my Android tablet.

Crash log:

java.lang.RuntimeException: 
  at android.app.ActivityThread.installProvider (ActivityThread.java:7462)
  at android.app.ActivityThread.installContentProviders (ActivityThread.java:7002)

Caused by: android.hardware.camera2.CameraAccessException: 
  at android.hardware.camera2.CameraManager.throwAsPublicException (CameraManager.java:1127)
  at android.hardware.camera2.CameraManager.getCameraCharacteristics (CameraManager.java:531)

Caused by: android.os.ServiceSpecificException: 
  at android.os.Parcel.createException (Parcel.java:2102)

They tried the following things but were still unable to get the app to open:

  1. Re-installed the app.
  2. Reset the tablet.
  3. Uninstalled an anti virus app.
  4. Removed lots of apps to see if anything was conflicting.
  5. Tried installing 16.5 beta.
  6. Tried installing 16.2 using the .apk available on GitHub.

Device & site details:

If this person is still experiencing a crash with 16.2 and the CameraX library is not being called from the app until 16.3 (stories launch), then it may be possible there is more than one crash at play or that the crash is not directly related to the library as we assumed.