npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova.manage.external.storage

v0.0.1

Published

This plugin request `MANAGE_EXTERNAL_STORAGE` on android devices with API 30+. The request gives access of all files to the app. You can read more about it here:-\ [Android Developers:- Manage all files](https://developer.android.com/training/data-storage

Downloads

35

Readme

Cordova Mange External Storage

This plugin request MANAGE_EXTERNAL_STORAGE on android devices with API 30+. The request gives access of all files to the app. You can read more about it here:-
Android Developers:- Manage all files

Installation

The plugin can be installed by following command:-

cordova plugin add https://github.com/GAGANsinghmsitece/cordova-manage-external-storage

After installing the files you need to declare the permissions in AndroidManifest.xml

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

Methods

The plugin provides following methods:-

  1. checkPermission:- This method checks whether we have the permission or not.
  2. requestPermission:- This method requests the permission.

Examples

  1. We can check whether we have the permission or not using the following example:-
cordova.plugins.manageStorage.checkPermission(function(result){
    if(result.response_code===1){
        //we have the permission
        return true;
    }else if(result.response_code===2){
        //we do not have the permission
        return false;
    }else{
        //API of device is below 30. Here, you can request WRITE_EXTERNAL_STORAGE permission here using cordova-plugin-android-permissions
    }
});
  1. For requesting the permission, you can use requestPermission method as follows:-
cordova.plugins.manageStorage.requestPermission(function(result){
    //here you can check the permission
});

It will launch settings app where user can grant permission to your app. Sadly, the intent does not return any result, hence, it is impossible to know if the user has provided the permission or simply closed the intent. To check the permission, you can use onResume lifecycle hook of cordova application.