jibon57 / nativescript-mediafilepicker

A complete file picker solution for NativeScript
Apache License 2.0
51 stars 39 forks source link

FilePicker ask for other permission #86

Closed cristiandaulisio closed 4 years ago

cristiandaulisio commented 5 years ago

Describe the bug I am using this plugin for filepicker mode only but when i upload on google play store i receive an error : https://i.imgur.com/JPYSUKf.png but i am not using camera.

`let extensions = { extensions = ['csv']; }

    let options: FilePickerOptions = {
        android: {
            extensions: extensions,
            maxNumberFiles: 1
        },
        ios: {
            extensions: extensions,
            multipleSelection: true
        }
    };

    let mediafilepicker = new Mediafilepicker();
    mediafilepicker.openFilePicker(options);

    mediafilepicker.on("getFiles", function (res)
    {
        let results = res.object.get('results');

    });

    mediafilepicker.on("error", function (res)
    {
        let msg = res.object.get('msg');

    });

    mediafilepicker.on("cancel", function (res)
    {
        let msg = res.object.get('msg');
        console.log("Cancel");
        console.log(msg);
    });`
xuhcc commented 4 years ago

Unneeded permissions can be removed by modifying App_Resources/Android/src/main/AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"    <-- Add this to manifest element
    package="__PACKAGE__">

    <!-- Remove permissions: -->
    <uses-permission android:name="android.permission.CAMERA" tools:node="remove"/>
    <uses-permission android:name="android.permission.RECORD_AUDIO" tools:node="remove"/>
dangrima90 commented 2 years ago

@xuhcc Do you know if there's a way to do this on iOS as well please? I'm asking as I'd like to remove certain permissions that are being added by this plugin.

xuhcc commented 2 years ago

@dangrima90 No, I'm not familiar with iOS.