Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova playback-only media plugin

My Cordova 3.4 application uses the media plugin for playback only. But adding org.apache.cordova.media automatically requests permission for recording audio and accessing external storage. I'd like to remove those unnecessary permissions. Is there any way to do so ?

like image 631
mig Avatar asked May 10 '14 07:05

mig


2 Answers

After you installed the media plugin go into the "plugins" directory within your cordova project. Edit two files and remove the permissions there:

1) android.json 2) org.apache.cordova.media/plugin.xml

When you make a new build with cordova - permissions should not get added anymore.

UPDATE: But its just a workaround ... if you de/install any plugins again, you may have to edit files again.

like image 143
rotzoll Avatar answered Oct 14 '22 12:10

rotzoll


I've forked the official Apache media plugin and just removed those permissions. Part of my build process now involves running the command that points to my forked repository:

cordova plugin add https://github.com/webnard/cordova-plugin-media.git#playback-only

like image 4
Ian Hunter Avatar answered Oct 14 '22 10:10

Ian Hunter