PhoneGap and Move to SD Card Android

Discussion and feedback on Construct 2

Post » Sun Jan 01, 2017 1:06 pm

Hi

After putting together a fairly small app/game with construct 2 , I found that Intel XDK was generating a massive compiled file of 111MB once installed onto my device. I then decided to give phonegap a go and found that once installed the app was only 1.26mb !!. All be said this game /app will inventually get bigger and so I noticed that when I compiled the project with Intel XDK I could move the app to the SD card within the devices application manager.

However on installing the compiled app/game through phonegap, this option was disabled. I looked around the net and found this link : http://ourcodeworld.com/articles/read/1 ... or-android

However I did not understand the part about install the plugins etc but I have tried to add the preference name line mentioned on this page into my exported Construct folders intelxdk.config.android.xml file in the section <platform name="android"> but when I save this file, re-build through phonegap after updating the code, uninstall the app from the device and then re-install it with the new build , the option to move to SD card is still disabled.

Can anyone please advise how I get this option to work with phonegap as this file size difference is amazing!

**EDIT **
I then noticed that the file for the settings was being built as intelxdk.config.android.xml because when exporting from Construct 2 the option to export with the new Intel XDK format was ticked. However after unticking this , although it created the config.xml , I hit two issues , the first being that there was not XML tag to refer to the installation location (which I then added myself but this has made no difference to resolving the issue) and the second appears that the plugin I added from the Construct2_Cordova_Plugins pack may not be compatible with Phonegap, shame if that is the case). I then removed the Construct2_Cordova_Plugin from the project re-exported it from Construct 2 with the new Intel XDK option taken off and the installation location in the config.xml but I am still not able to get this to work.
Regards

TimCS
B
23
S
8
Posts: 129
Reputation: 1,915

Post » Sun Jan 01, 2017 2:51 pm

Got this working by adding <preference name="android-installLocation" value="auto"/> just under the line
<preference name="android-targetSdkVersion" value="21" />

in the config.xml file which is created when exporting from Construct 2 having the use new Intel XDK project format option unticked.

My only problem now is if the Construct2 Cordova Plugins will be able to work or not with phonegap :/
Regards

TimCS
B
23
S
8
Posts: 129
Reputation: 1,915


Return to Construct 2 General

Who is online

Users browsing this forum: Tinimations and 8 guests