Commit Graph

1301 Commits

Author SHA1 Message Date
Tibor Kaputa 55c4575d03
Update ChangeResolutionDialog.kt 2022-07-13 08:52:36 +02:00
darthpaul 44223d4ba9 refactor VideoQualityManager 2022-07-13 02:54:44 +01:00
darthpaul 99f79e4671 fix settings toolbar 2022-07-13 02:54:32 +01:00
darthpaul 6c1ccd8db7 fix getting video quality 2022-07-13 02:13:02 +01:00
darthpaul 7a55969e6d update commons and camerax 2022-07-13 02:11:38 +01:00
darthpaul 210f3e35c0 use the resolution index instead of the qualities
- store and use the resolution index in Config class for video capture
2022-07-13 01:38:54 +01:00
darthpaul d8ea6d5175 pass rotated resolution to ImageCaptureUsecase
- filter supported resolutions so 0MP resolutions are not selected. CameraX cannot apply these resolutions
2022-07-13 00:54:14 +01:00
darthpaul d3d67ec4a4 remove exif info after image capture if user config.savePhotoMetadata == false 2022-07-12 22:15:44 +01:00
darthpaul e1f292692a properly ensure RECORD_AUDIO permission is requested during camera initialisation
- since allowBackup is set to true in the manifest,
- it is possible for the app to be launch after a fresh install with mIsInPhotoMode=true in MainActivity
- this commit ensure the audio permission is requested at this point
- if the user denies, then it is initialised in photo mode instead
2022-07-10 18:57:01 +01:00
darthpaul d5e1d61d02 fix passing bitmap thumbnail after IMAGE_CAPTURE intent
- add a new BitmapOutput, returned from the MediaOutputHelper when no output URI is specified in an IMAGE_CAPTURE intent
- in this format, take the picture without actually saving it and return the bitmap
- this behaviour is consistent with the implementation described in the official Android docs https://developer.android.com/training/camera/photobasics#TaskPhotoView
2022-07-09 02:55:41 +01:00
darthpaul 74e2656831 try to handle changing video quality and image resolution
- CameraX video allowed predefined buckets of qualities UHD, FHD, HD, SD (defined in VideoQuality enum),
the CameraXPreview is configured to use the highest quality and
 CameraX will select the closest corresponding resolution supported by the device.
- tentatively add ChangeResolutionDialogX (which would be renamed back to ChangeResolutionDialog) to give user option to select photo resolution and video qualities
- add ImageQualityManager which performs the same operation for getting all resolutions supported by a device using the Camera2 API, as defined in the legacy CameraPreview
- add VideoQualityManager to manage saving/ getting user selected quality.
2022-07-08 00:12:03 +01:00
darthpaul 889a384f21 handle 3rd party image/video capture intents
- in MediaOutputHelper,
   - add support for specifying the output URI if present in the intent
   - when the output URI is specified,
       - for Image Capture, we return a `Bitmap` as a `data` extra and also the URI as the Intent data
       - for Video Capture we return the `Uri` as the Intent data
    - if no output URI is specified in the capture intent or if there is an error while trying to access the URI, use the default location with MediaStore, so we do not return inconsistent URIs (eg, SAF tree URIs)

- add CameraXInitializer to abstract CameraXPreview initialisation logic
2022-06-30 00:23:41 +01:00
darthpaul f43cd4f939 handle some camera errors
- add CameraErrorHandler to handle
  - errors during camera lifecycle
  - when capturing images
  - when recording videos
2022-06-26 21:54:32 +01:00
darthpaul b10d8639fd handle torch state in video capture
- set initial torch state to off
- enable/disable the torch when flash mode is on/off in video mode
2022-06-26 11:12:43 +01:00
darthpaul 79f9267383 handle storage location
- add MediaOutputHelper
   - to create OutputStream for photos
   - to create FileDescriptor for videos (currently requires API 26+)
2022-06-26 10:58:17 +01:00
darthpaul e691fc1e8c use more stable CameraX 1.1.0-rc02 2022-06-26 00:12:19 +01:00
darthpaul 79cbe55a7f Merge branch 'master' into feat/camera-x 2022-06-25 23:33:12 +01:00
darthpaul d168040722 replace property getters with actual functions in CameraXPreview 2022-06-25 23:25:20 +01:00
darthpaul cc5fa462c4 revert compileSdkVersion and targetSdkVersion to 31 2022-06-25 23:22:37 +01:00
darthpaul 916121ffc9 store/restore last used camera lens 2022-06-25 23:21:51 +01:00
darthpaul fe3710510d add pinch to zoom support 2022-06-25 22:42:47 +01:00
darthpaul b44b6a9b2b update focus and unbind useCase
- update to use the DisplayOrientedMeteringPointFactory
- add Auto Focus (AF) and Auto Exposure (AE) metering points
- unbind VideoCaptureUseCase when in photo mode
- unbind ImageCaptureUseCase when not in photo mode
2022-06-25 21:42:15 +01:00
darthpaul e15078499b modify package name and app name
- this is so we can install both versions on the same device
- it would be reverted when camerax is ready to go live
2022-06-25 18:10:33 +01:00
darthpaul f0030670cf add basic support for focus and metering 2022-06-25 17:51:13 +01:00
darthpaul 1f3dd341d0 add flipping horizontally and photo quality 2022-06-25 17:14:49 +01:00
darthpaul c398370446 handle playing media sounds
- add MediaSoundHelper to separate logic for playing media action sounds
- add support for playing media action sounds (shutter, start and stop recording) in CameraXPreview
2022-06-25 16:39:29 +01:00
darthpaul 074351b88f add initial camera-x implementation
- add CameraXPreview
  - basic support image capture
  - basic support for video capture
  - add CameraXPreviewListener to prevent coupling to MainActivity
  - support switching camera, flash light modes
- modify MyPreview interface to add default implementation for methods not needed by the CameraXPreview
2022-06-25 15:43:39 +01:00
tibbi ff90f08094 removing a string available in Commons 2022-06-22 23:38:24 +02:00
Tibor Kaputa 61228b11f7
Merge pull request #316 from weblate/weblate-simple-mobile-tools-simple-camera
Translations update from Hosted Weblate
2022-06-22 23:35:48 +02:00
Tibor Kaputa ab6fd9b041
Update strings.xml 2022-06-22 23:35:29 +02:00
Tibor Kaputa 246b5f614f
Update strings.xml 2022-06-22 23:35:14 +02:00
Eric 0f294650ff
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (3 of 3 strings)

Translation: Simple Mobile Tools/Simple Camera metadata
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera-metadata/zh_Hans/
2022-06-22 23:32:20 +02:00
Giovanni Donisi 1260a7805e
Translated using Weblate (Italian)
Currently translated at 100.0% (3 of 3 strings)

Translation: Simple Mobile Tools/Simple Camera metadata
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera-metadata/it/
2022-06-22 23:32:20 +02:00
Josep M. Ferrer 8fd6b7e13a
Translated using Weblate (Catalan)
Currently translated at 100.0% (3 of 3 strings)

Translation: Simple Mobile Tools/Simple Camera metadata
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera-metadata/ca/
2022-06-22 23:32:20 +02:00
мачко 84f89617ef
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/bg/
2022-06-22 23:32:20 +02:00
AHOHNMYC d83c9524c4
Translated using Weblate (Russian)
Currently translated at 100.0% (34 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/ru/
2022-06-22 23:32:20 +02:00
Alberto 085b76d3c5
Translated using Weblate (Spanish)
Currently translated at 100.0% (34 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/es/
2022-06-22 23:32:20 +02:00
אליעזר שלמה דיין a92d749980
Translated using Weblate (Hebrew)
Currently translated at 100.0% (34 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/he/
2022-06-22 23:32:20 +02:00
Anonymous a3173efdb3
Translated using Weblate (Portuguese (Brazil))
Currently translated at 0.0% (0 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/pt_BR/
2022-06-22 23:32:20 +02:00
Weblate f31d0bc44b
Added translation using Weblate (Portuguese (Brazil)) 2022-06-22 23:32:20 +02:00
Anonymous 3d36b96784
Translated using Weblate (Hebrew)
Currently translated at 0.0% (0 of 34 strings)

Translation: Simple Mobile Tools/Simple Camera
Translate-URL: https://hosted.weblate.org/projects/simple-mobile-tools/simple-camera/he/
2022-06-22 23:32:20 +02:00
Weblate f177568563
Added translation using Weblate (Hebrew) 2022-06-22 23:32:20 +02:00
tibbi dfe9a0d051 updating some casual things 2022-06-22 23:32:14 +02:00
tibbi 9ccd1402bf changing the indonesian language from id to in 2022-06-21 23:24:35 +02:00
tibbi 24b66b0ab3 removing fastlane changelog files 2022-06-21 23:11:24 +02:00
tibbi 0d7271200f removing the wrong Indonesian fastlane folder 2022-06-21 15:33:06 +02:00
tibbi c9218393f6 updating some fastlane info 2022-06-19 15:22:31 +02:00
tibbi ce179b8ebf updating the feature graphic 2022-06-19 12:36:11 +02:00
tibbi 13abdcd874 Merge branch 'master' of github.com:SimpleMobileTools/Simple-Camera 2022-06-05 23:11:59 +02:00
Tibor Kaputa 40e76fe4b5
Merge pull request #314 from weblate/weblate-simple-mobile-tools-simple-camera
Translations update from Hosted Weblate
2022-06-05 23:11:41 +02:00