57 Commits
Author SHA1 Message Date
lpfrenette 365d20854e fix(android): Android build error webview namespace (#507) 2023-06-26 23:18:12 +02:00
Arjan Zuidema 2e4851eae7 feat(android): Add support for upcoming React Native 0.73 (#505) 2023-06-26 11:26:44 +02:00
Théo Poizat 1f6499be0a feat(iOS): Add subTypes field (#495)
Allow to know PHAssetMediaSubtype on iOS.
So for example if a node is a LivePhoto or a Panorama.
2023-05-31 09:33:11 +02:00
Théo Poizat a419ccce27 feat(all): Add modificationTimestamp field (#493)
* feat(android): Rename modified node field to more explicit name

* feat(ios): Return modificationDate in ios

* docs: Add modification date in ts, docs and examples
2023-05-22 15:03:05 +02:00
Hyungu Kang | Airen 5805999f77 fix(android): search for node_modules in a wider scope (#488) 2023-04-28 15:00:29 +02:00
eurekaffeine 5ca38a86f2 fix(android): NullPointerException when inserting of ContentResolver (#469) 2023-03-13 11:25:01 +01:00
Nick Vlug 8e3e1f736d chore: remove accidental mention of clipboard (#479) 2023-03-13 11:24:14 +01:00
Wojciech Lewicki 2b595e5266 feat: Add support for new architecture (Fabric) (#460) 2023-03-09 14:47:47 +01:00
Arkady MagomedovandArkady Magomedov 65f20b0ff6 fix(android): save video error (#465)
Co-authored-by: Arkady Magomedov <amagomedov@microsoft.com>
2023-02-21 07:36:08 +01:00
Mats01-ferandMats01-fer 59a50b5f04 fix(android): Handle Null case when reading orientation (#456)
commit e4e239c374e6ac74f095f060ae3e0e4fcb925ee7
Author: Mats01 <“matej.butkovic@gmail.com”>
Date:   Wed Jan 18 21:00:40 2023 +0100

    add isnull orientation check

commit ed312f6d53e109691d586bd00c21597426b2a7ae
Author: Mats01 <“matej.butkovic@gmail.com”>
Date:   Wed Jan 18 17:16:17 2023 +0100

    add check if rotation was read

commit 6a156435ba31bcdd3bd3f4aa846f0d9bb2f11fbe
Author: Mats01 <“matej.butkovic@gmail.com”>
Date:   Fri Jan 13 14:29:09 2023 +0100

    return whitespace to original state

commit 87f268c957e0348893ef1b576f1de10a006e3a68
Author: Mats01 <“matej.butkovic@gmail.com”>
Date:   Fri Jan 13 14:03:05 2023 +0100

    update readme

commit ff328f581ce4720541741f18ebf0e43d0698ba6e
Author: Mats01 <“matej.butkovic@gmail.com”>
Date:   Fri Jan 13 14:00:42 2023 +0100

    reverse witdh-height on andorid if orientation indicates rotation

commit 89dd22831dd1d8f8fc7d362f2511cf8dd55ffa15
Author: Mats01 <matej.butkovic@fer.hr>
Date:   Thu Jan 12 18:54:10 2023 +0100

    add orientation to data return about image

Co-authored-by: Mats01-fer <“matej.butkovic@gmail.com”>
2023-01-24 15:54:17 +01:00
Mats01-ferandMats01 872105f2a8 fix(android): include orientation option (#454)
* add orientation to data return about image

* reverse witdh-height on andorid if orientation indicates rotation

* update readme

* return whitespace to original state

Co-authored-by: Mats01 <“matej.butkovic@gmail.com”>
2023-01-23 15:04:47 +01:00
digvijaysinh-rana-trootech a2c649a218 fix(android): Fixed always getting null location of video file. (#450) 2023-01-05 10:19:21 +01:00
Tolgahan Çelik d515b12681 feat(all): file extension support (for CameraRoll.getPhotos ) (#440)
* Ios added extension support.

* Android added extesion support.

* Android mimetype process moved to utils.

* Typescript added types.

* Readme added types.
2022-12-08 09:22:33 +01:00
Mahdi Ghorbani ae3f55df87 fix(android): filter by timestamp 2022-10-10 09:04:59 +02:00
Huu Truong e0aa3bce88 fix(android): Save video on Android (#430) 2022-09-30 14:46:18 +02:00
Arjan Zuidema f23434df69 fix(android): retriever.release fix (#425) 2022-09-06 10:31:30 +02:00
Simon Farshid a0abf74c2e fix(android): compile error when compileSdkVersion is set to 33 (#419) 2022-09-01 13:38:36 +02:00
Bartol Karuzaandidrissakhi c230dd0074 feat(all): fix various issues and big maintenance update of the library (#404) (#411) BREAKING
Fixes
fix(ci): fixed android release build as a CI test step

fix(android): Fix MediaStore issues and support scopped storage #322 #244

fix(android): Fix saveImageToCameraRoll #248 #254

fix(android): remove JCenter #340 #401

fix(ios): Fix performance issues #276

fix(ios): add method to get file Path from internal PH ID #135

fix(react-native): Bump used dependencies #393 ...

Fixes #322
Fixes #244
Fixes #248
Fixes #254
Fixes #340
Fixes #401
Fixes #276
Fixes #135
Fixes #393

new Features

feat(ios): now it's possible to listen to library selection changes
`useEffect(() => {
let subscription: EmitterSubscription;
if (isAboveIOS14) {
subscription = cameraRollEventEmitter.addListener('onLibrarySelectionChange', (_event) => {
getUnloadedPictures();
});
}

return () => {
if (isAboveIOS14 && subscription) {
subscription.remove();
}
};`

feat(ios): possibility to open native modal to update selection when authorization is limited
iosRefreshGallerySelection()
feat(ios): Convert HEIC images on demand to upload to server
BREAKING CHANGE: root import changed!
```
import { CameraRoll } from @react-native-community/cameraroll
instead of
import CameraRoll from @react-native-community/cameraroll
```

Co-authored-by: idrissakhi <85105624+idrissakhi@users.noreply.github.com>
2022-08-23 08:13:10 +00:00
Felix-Motili 7c269a837d Fixed "Value must be ≥ 0" linter error (#346)
* Fixed "Value must be ≥ 0" linter error

fixes:
> Task :react-native-community_cameraroll:compileDebugJavaWithJavac FAILED
/Users/felix.moses/Documents/motilionsitemobile/node_modules/@react-native-community/cameraroll/android/src/main/java/com/reactnativecommunity/cameraroll/CameraRollModule.java:455: error: ';' expected
              int column = media.getColumnIndex(MediaStore.Images.ImageColumns.BUCKET_DISPLAY_NAME)

* oops
2021-10-22 09:43:08 +02:00
John 60e0e8e737 fix(orientation): fix width/height info using EXIF data (#343) 2021-10-09 22:51:13 -05:00
Hanno J. Gödecke a5befe328c fix: (Android) Fixed issue where timestamp was "0" (#277) 2021-03-21 12:34:01 +09:00
Mik a83ad4c14e fix: RuntimeException on faulty video files (#241)
fixes #239
2020-10-07 03:30:21 +00:00
gavan b6038a7f0f fix: fix for crash on putImageSize due to photoDescriptor being null. (#240)
fixes #226 #239
2020-09-29 14:52:33 +03:00
Harry Yu ec33d328af feat: Added imageSize and playableDuration to include param, deletes isStored (#187)
BREAKING CHANGE: imageSize and playableDuration are no longer included by default to improve performance
2020-06-23 08:45:20 +03:00
Bartol KaruzaandHarry Yu 4da8310892 feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178) (#200)
BREAKING CHANGE: meta data is no longer added as default. This applies to `fileName`, `fileSize` and `location`. If you need this metadata use the new `include` parameter. Adding this metadata will slow down the `getPhotos` function, so consider only retrieving this meta data for smaller sets of images as needed, instead of for all images.

* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases

Co-authored-by: Harry Yu <hy.harry.yu@gmail.com>
2020-06-16 13:20:51 +03:00
Bartol Karuza e65e1f208b fix: Revert "feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)" (#199) 2020-06-16 13:05:12 +03:00
Harry Yu e54a6afa8b feat: Added include parameter to getPhotos to let users tradeoff performance by omitting metadata (#178)
* Created getPhotosFast function, fixed inconsistent getPhotos toDate logic

* Fixed wrong param name, added better typechecking

* Added example, renamed allowEmptyFilenames to skipGettingFilenames

* Removed `after` from getPhotosFast docs

* Redid implementation based on a new `include` param

* Updated API to use include parameter

* Fixed flow checking by converting index.ts to Typescript

* Unformatted README.md

* Unformatted README.md

* Unformatted README.md

* Added .prettierignore and ignored README.md for now

* Made example/index.js not checked by Flow

* Updated README.md to include notes in the outputs too

* Made inclusion of fields consistent, addressed other feedback

* Renamed GetPhotosFastParams back to GetPhotosParams

* Updated documentation to reflect nullable types

* Updated typings and documentation for fromTime, toTime

* Updated to fix `hasNextPage` being incorrectly false in some cases
2020-06-16 12:07:25 +03:00
Antonio GalloandAntonio Gallo b5352cb8be fix: Use DCIM folder when album is not provided on Android. (#185)
fixes #141

Co-authored-by: Antonio Gallo <antgallo@amazon.com>
2020-05-26 13:16:54 +03:00
Antonio GalloandAntonio Gallo e7cf8665d4 feat: Added fileSize for getPhotos API (#180)
Co-authored-by: Antonio Gallo <antgallo@amazon.com>
2020-05-20 20:35:59 +03:00
Antonio GalloandAntonio Gallo 563ec15239 fix: Fixed 'Invalid column COUNT(*) as count' on CameraRoll.getAlbums() due to GROUP BY support removed in Android Q. (#176)
Co-authored-by: Antonio Gallo <antgallo@amazon.com>
2020-05-20 18:59:54 +03:00
Slava Koshevoi 39fe65e951 fix: Fixed 'Invalid column longitude' in Android 29 SDK (#170)
* Added checking for android API. Set LONGITUDE and LATITUDE for images if API < 29

* Removed Images.Media.LONGITUDE and Images.Media.LATITUDE from PROJECTION
2020-05-12 18:50:58 +03:00
Syed RahamanandSyed Rahaman ade785e29d feat(android): Manually obtain location metadata using ExifInterface (#114)
* Manually obtain location metadata using ExifInterface

* import ExifInterface

* remove log statement

* removed unused code and put comments

* change error message text

* code formatting

Co-authored-by: Syed Rahaman <syed.rahaman@kartbites.com>
2020-04-30 15:14:37 +03:00
Bartol Karuza bd23aa15d8 fix: rollback getExceptionHandler change (#158)
REVERT: fix: Update deprecated functions (#149)
2020-03-26 11:56:13 +02:00
Juang, Yi-Lin 3e38ab1419 fix: Update deprecated functions (#149)
Fix warning `[deprecation] GuardedAsyncTask(ReactContext) in GuardedAsyncTask has been deprecated`
2020-03-26 10:20:41 +02:00
Tuan Luong fc1855e001 feat: get album list (#139) 2020-02-08 11:17:56 +08:00
Kevin Brown b49dc8e631 fix: Making Promise return types consistent across iOS and Android, updating types to match. (#137) 2020-02-05 17:21:59 +08:00
Tuan Luong 75b4208474 feat: Support filter media items between dates (#140)
* Update RNCCameraRollManager.m

* Update CameraRollModule.java

* Update README.md

* Update RNCCameraRollManager.m

* Update CameraRoll.d.ts

* Update RNCCameraRollManager.h

* Update CameraRollModule.java

* Update RNCCameraRollManager.m

* update code
2020-02-05 17:20:54 +08:00
Bartol Karuza 24f141cada Revert "Merge pull request #3 from FrikkieSnyman/use-dcim-for-save (#94)"
This reverts commit 947f1b0dce.
2020-01-20 18:04:36 +08:00
Frikkie Snyman 947f1b0dce Merge pull request #3 from FrikkieSnyman/use-dcim-for-save (#94)
Use DCIM dir for saveToCameraRoll
2020-01-20 17:52:35 +08:00
Kevin Brown 33dfb99d35 fix(lib): Fix for pagination on Android. (#130)
fixes #47 
fixes #118
2020-01-20 16:52:42 +08:00
Seph Soliman 902abd4f70 fix(lib): Android 10 screenshot sorted incorrectly (#98)
Fixes #97
2019-11-07 14:17:11 +01:00
Kevin Brown 7850dd538f feat(lib): Moved deletePhotos to use new PHAsset API and added an implementation for Android (#69)
* deletePhotos works in iOS

* Deletion works on Android.

* Removing unnecessary commented out code.

* Updated typescript typings.

* Made readme more accurate based on being able to retrieve failure from the iOS API.

* Let formatter run, also now rejecting the promise when there's any error on deletion on Android.
2019-11-07 14:13:24 +01:00
SimonErm dc00a4f115 feat(lib): save photos or videos to an album
* add option to specify album in saveToCameraRoll and move the optional type param to options

* check platform before setting default value for group types to prevent exception

* adjust typings

* update invariant message

* format code

* extract new implementation to function to avoid breaking change

* format code

* add missing spaces

* fix(lib): add accidentally removed savedphotos back to the enum to prevent crash

* chore(lib): formatting

* chore(lib): add doc for the new save method
2019-08-14 21:00:20 +02:00
Edward Smith f420cefa77 feat(lib): Filename added to the image properties iOS and Android (#61)
* fix(lib): mirror fix PHAsset video upload

https://github.com/facebook/react-native/commit/458e70c79d3e12b5ad017d17ccea2fd62c1c3781#diff-3a2b7a4c4ebe5ac224b5a32896c032fb

* Include the filename in both iOS and Android

* Add filename to docs
2019-06-13 08:24:46 +02:00
Bartol Karuza 7c05112883 fix(lib): fix groupType all not working on Android (#57)
fixes #56
2019-05-13 20:44:56 +02:00
Frikkie Snyman 76b828b469 Use the MimeType reported by the media Cursor instead of trying to guess the mime type from uri (#54)
This prevents the crash when the device contains images with a `#`
2019-05-07 21:59:07 +02:00
Frikkie Snyman 2e97105db3 Rename ReactNativeNetInfo -> ReactNativeCameraRoll in Gradle.properties 2019-04-09 09:10:34 +02:00
Bartol Karuza d4a7ab7194 chore(android) fix native build 2019-03-03 15:43:30 +08:00
Bartol Karuza 0c453b6118 general cleanup
Added typescript binding
Fixed flow type issues
renamed NativeModule to RNCCameraRoll
Added basic jest tests
prettier/lint issues fixed
2019-03-03 14:39:57 +08:00
Bartol Karuza 605302a517 fix up Android example project to compilation 2019-02-24 13:30:55 +08:00