{"id":18783564,"url":"https://github.com/sticknet/react-native-gallery-manager","last_synced_at":"2025-10-24T05:11:06.636Z","repository":{"id":57700427,"uuid":"501286853","full_name":"sticknet/react-native-gallery-manager","owner":"sticknet","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-08T18:34:13.000Z","size":426,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-20T17:29:49.804Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sticknet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-08T14:30:07.000Z","updated_at":"2022-06-08T14:30:25.000Z","dependencies_parsed_at":"2022-09-26T21:10:46.297Z","dependency_job_id":null,"html_url":"https://github.com/sticknet/react-native-gallery-manager","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sticknet/react-native-gallery-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sticknet%2Freact-native-gallery-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sticknet%2Freact-native-gallery-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sticknet%2Freact-native-gallery-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sticknet%2Freact-native-gallery-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sticknet","download_url":"https://codeload.github.com/sticknet/react-native-gallery-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sticknet%2Freact-native-gallery-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280742528,"owners_count":26382926,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T20:39:46.689Z","updated_at":"2025-10-24T05:11:06.575Z","avatar_url":"https://github.com/sticknet.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Gallery Manager\n\n#### Gallery manager for iOS and Android\n\n\n## Installation\n\n```bash\nnpm install --save react-native-gallery-manager\n```\n\nor\n\n```bash\nyarn add react-native-gallery-manager\n```\n\nand then\n\n```bash\nreact-native link\n```\n\n\u003cspan style=\"color:red\"\u003e NOTE: If you are using CameraRoll from react-native, you have to unlink it before using this library\u003c/span\u003e\n\n\n## Issues\n* If the image is not being shown in Android try the following\n\t* [increase fresco memory](https://medium.com/in-the-hudl/configure-fresco-in-react-native-28c2bc7dcc4d)\n\t* resizeMethod='resize' to the Image component\n\t* removeClippedSubviews={true} to ScrollView (FlatList, SectionList)\n\t* android:largeHeap=\"true\" to the android manifest.xml in the application section (I dont recommend that but, you got to do, what you got to do....)\n\n[#10569](https://github.com/facebook/react-native/issues/10569)\n[#13600](https://github.com/facebook/react-native/issues/13600)\n[#10470](https://github.com/facebook/react-native/issues/10470)\n\n\n\n## Usage\n\n```javascript\nimport GalleryManager from 'react-native-gallery-manager';\n```\n\n## Methods and Responses\n\n### Get Assets\n```javascript\nGalleryManager.getAssets({\n    type: 'all',             \n    startFrom: 0,\n}).then((response) =\u003e {\n\n}).catch((err) =\u003e {\n    // no rejects are defined currently on iOS\n})\n```\n\n| Props        \t| Type          \t| Default | Notes  |\n| ------------- \t|:-------------:\t| :------:|:-----|\n| type      \t\t| String \t\t\t| 'all'|Type of the asset returned, can be 'image', 'video', 'all' |\n| limit      \t\t| Number \t     \t| 10|how many asset to return in one call |\n| startFrom \t\t| Number      \t| 0|From which index to start |\n| albumName \t\t| String      \t| | Set the name of the album from which you want assets (Optional) |\n\n##### Response\n\n```javascript\n{\n   assets:[\n      {\n         type:'image',\n         uri:'file:///storage/emulated/0/Download/ylo6z7D.jpg',\n         id:38,\n         filename:'ylo6z7D.jpg',\n         width:3456,\n         height:1944,\n         creationDate:'1517064428',\n         duration:0,\n         mimeType:'image/jpeg'\n      },\n      ...\n   ],\n   totalAssets:7,\n   next:7,\n   hasMore:false\n}\n```\n\n### Get Albums\n```javascript\nGalleryManager.getAlbums().then((response) =\u003e {\n\n}).catch((err) =\u003e {\n    // no rejects are defined currently on iOS\n})\n```\n\n##### Response\n\n```javascript\n{ \n    albums: \n        [ \n            { \n            \tassetCount: 616, title: 'WhatsApp' \n            },\n            { \n            \tassetCount: 6, title: 'Instagram' \n            },\n            { \n            \tassetCount: 1, title: 'Twitter' \n            },\n            ...\n        ],\n    totalAlbums: 24 \n}\n```\n\n### Check Permission\n```javascript\nGalleryManager.requestAuthorization(title, message).then((response) =\u003e {\n    // response.isAuthorized = true || false\n}).catch((err) =\u003e {\n    \n})\n```\n| Props        \t| Type          \t| Default | Notes  |\n| ------------- \t|:-------------:\t| :------:|:-----|\n| title      \t\t| String \t\t\t| | (Android) title of the dialog | \n| message      | String \t     \t| | (Android) message in the dialog |\n\n#### Convert Video (iOS only)\n```javascript\nGalleryManager.convertVideo({\n\tid: '98F14DF6-3BF9-4D1B-A6E0-0A36A25AE377/L0/001',\n\tconvertTo: 'm4v',\n\tquality: 'low'\n}).then((response) =\u003e {\n\tconsole.log(response);\n}).catch((err) =\u003e {\n   console.log(err)\n});\n```\n\n| Props        \t| Type          \t| Default | Notes  |\n| ------------- \t|:-------------:\t| :------:|:-----|\n| id      \t\t| String \t\t\t| | The id of the video asset | \n| convertTo      | String \t     \t| |Can be mpeg4, m4v or mov |\n| quality \t\t| String      \t| original |Can be original, high, medium, low |\n\n##### Response\n```javascript\n{ \n  mimeType: 'video/x-m4v',\n  path: 'file:///Users/pentarex/Library/Developer/CoreSimulator/Devices/81873DB4-A220-4F60-88B8-87521BB231E6/data/Containers/Data/Application/91EE6566-4D04-4E33-9608-EDB06DA6C6D2/Documents/8DAEDFBC-9E16-442D-A98F-E145F429DA0B.m4v',\n  filename: '8DAEDFBC-9E16-442D-A98F-E145F429DA0B.m4v',\n  type: 'video',\n  duration: 19.185833333333335 \n}\n```\nThe reason the library is returning the path of the file in this format is that the video can be send later to server with fetch library. If the url starts with assets-library:// not with file:// react-native will not send it.\n\n\n\n### Roadmap\n\n\n### Suggestions and forks are welcome\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsticknet%2Freact-native-gallery-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsticknet%2Freact-native-gallery-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsticknet%2Freact-native-gallery-manager/lists"}