{"id":21560881,"url":"https://github.com/pouu69/cordova-plugin-gallery-refresh","last_synced_at":"2025-04-10T11:52:20.903Z","repository":{"id":57146521,"uuid":"95851035","full_name":"pouu69/cordova-plugin-gallery-refresh","owner":"pouu69","description":"cordova plugin gallery refresh for Android or IOS","archived":false,"fork":false,"pushed_at":"2023-09-26T21:45:12.000Z","size":11,"stargazers_count":4,"open_issues_count":4,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T23:29:52.258Z","etag":null,"topics":["android","cordova","gallery","plugin","refresh"],"latest_commit_sha":null,"homepage":"","language":"Java","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/pouu69.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-30T05:13:45.000Z","updated_at":"2023-09-10T09:55:50.000Z","dependencies_parsed_at":"2024-10-20T09:58:42.248Z","dependency_job_id":null,"html_url":"https://github.com/pouu69/cordova-plugin-gallery-refresh","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"35afb89d2f41c2ee4503785f1f48a102223eabe0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouu69%2Fcordova-plugin-gallery-refresh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouu69%2Fcordova-plugin-gallery-refresh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouu69%2Fcordova-plugin-gallery-refresh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouu69%2Fcordova-plugin-gallery-refresh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouu69","download_url":"https://codeload.github.com/pouu69/cordova-plugin-gallery-refresh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247694866,"owners_count":20980732,"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","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":["android","cordova","gallery","plugin","refresh"],"created_at":"2024-11-24T09:17:50.896Z","updated_at":"2025-04-10T11:52:20.888Z","avatar_url":"https://github.com/pouu69.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cordova-plugin-gallery-refresh\n## Device\n- android\n- ios\n\n## What is it?\n\u003e It is a plugin that allows you to do scanning after the download.\n\n`inappbrowser` plugin을 사용하여 remote web을 사용할 때 web상에서 `FileTransfer` 를 이용하여 이미지를 다운로드 하면 디바이스 포토갤러리에서 자동으로 인식하여 리스팅 해줘야 하는데 현재 `cordova` 는 지원하지 않고 수동으로 스캐닝 해줘야 한다.  \n그래서 강제로 다운로드 이후 스캐닝 작업을 해줘 포토갤러리에서 인식하게 해주는 plugin이다.\n\n## install\nJust add this line in config.xml\n````\n// config.xml\n\u003cplugin name=\"cordova-plugin-gallery-refresh\" /\u003e\n\n// or\n$ cordova plugin add cordova-plugin-gallery-refresh\n````\n\n## Usage\n```` javascript\n// call refresh method after file transfer download success\nwindow.galleryRefresh.refresh(\n  entry.toURL(), // file local path\n  function(success){ console.log(success); }, // success callback\n  function(error){ console.log(error); } // error callback\n);\n````\n\n```` javascript\n// Exam\n  var fileTransfer = new FileTransfer();\n  var uri = encodeURI(this.args.url);\n  var fileURL = fileEntry.toURL();\n\n  console.log(fileEntry);\n  fileTransfer.download(\n      uri, // file's uri\n      fileURL, // where will be saved\n      function (entry) {\n          console.log(\"Successful download...\" , entry.toURL());\n          window.galleryRefresh.refresh(\n            entry.toURL(),\n            function(success){ console.log(success); },\n            function(error){ console.log(error); }\n          );\n      },\n      function (error) {\n          console.log(\"download error source \" + error.source);\n          console.log(\"download error target \" + error.target);\n          console.log(\"upload error code\" + error.code);\n      },\n      null, // or, pass false\n      {}\n  );\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouu69%2Fcordova-plugin-gallery-refresh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouu69%2Fcordova-plugin-gallery-refresh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouu69%2Fcordova-plugin-gallery-refresh/lists"}