New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

capacitor-gallery

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

capacitor-gallery

plugin to grab assets from device filesystems

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

Plugin to grab assets from device filesystems. Any contributions are welcome!

Requirements

You need to include following permissions in Android Manifest:

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

You need to configure info.plist for ios build:

  • Privacy - Photo Library Additions Usage Description
  • Privacy - Photo Library Usage Description

Install

npm install capacitor-gallery
npx cap sync

Video Examples

Code Example

CapacitorGallery.getGalleryItems({
  quantity: 20,
  offset: 0
})
  .then((result) => {
    console.log(result)
  });

Instead of loading all assets you can use offset to split all assets by groups and load them as you need them. See an example

API

getGalleryItems(...)

getGalleryItems(options: GetGalleryItemsOptions) => Promise<GetGalleryItemsResponse>
ParamType
optionsGetGalleryItemsOptions

Returns: Promise<GetGalleryItemsResponse>

Interfaces

GetGalleryItemsResponse

PropType
countnumber
resultsGalleryItem[]
nextOffsetnumber
nextMaxQuantitynumber

GalleryItem

PropType
idstring
base64Imagestring
creationDatestring

GetGalleryItemsOptions

PropType
quantitynumber
offsetnumber

Keywords

capacitor

FAQs

Package last updated on 28 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts