Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android installLocation when building with cordova cli

I am building a large cordova/phonegap app using the cordova CLI tools. I need the installLocation in the AndroidManifest.xml file to have the installLocation="auto" (or preferExternal) setting. I have tried placing <preference name="android-installLocation" value="auto" /> in my config.xml file. However, I think that preference might only be valid when building with phonegap, not cordova.

Is there a way to get this preference automatically added to the AndroidManifest.xml when building with the Cordova CLI tools?

like image 898
John Weidner Avatar asked Jun 08 '15 14:06

John Weidner


1 Answers

This plugin does exactly what you need: https://github.com/dpa99c/cordova-custom-config.

It extends the default capabilities of cordova-cli to patch the platform specific files on iOS and Android. Of course, these extra configuration options might be overridden by future versions of cordova, but for now it does the job.

like image 82
Vlad Stirbu Avatar answered Sep 23 '22 07:09

Vlad Stirbu