Phone gap and Cordova Plugins?

Get help using Construct 2

Post » Tue May 30, 2017 2:48 am

I put my App's ID into the config thing but im still getting an error in phone gap. How do I add Cordova IAP and Game plugins to Phone gap? i tried the APP_ID with both ' ' and without and both times said error.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 2:55 am

I put in my ID for APP_ID but it keeps saying that there's an error of some kind. How do I put the game's ID into the APP_ID in the config for Phone gap? i tried putting into different places in the config with the plugin name in the config.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 5:02 am

B
24
S
9
G
8
Posts: 49
Reputation: 6,040

Post » Tue May 30, 2017 5:17 am

Thank you. I need to switch to Phonegap cause my game as WebGL effects and Cocoon io doesn't work with WebGL anymore:

cocoon-io-doesn-t-support-construct-2-anymore_t192166
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 5:20 am

Sorry, I didn't see anything in the tutorial about adding Plugins. I also didn't see the Android target sdk in the tutorial either, sorry.

3- Change your “android-targetSdkVersion” to 24 -> Optional

4- For code Number 3 to work you need to add this code before your project id:

1
xmlns:android = "http://schemas.android.com/apk/res/android"
- For example, see down picture:

Open full size image

5 - Change your version from “1.0.0.0” to “1.0” -> Optional

I didn't see the target sdk in the screenshots. Also how do you add plugins? i'm using Cordova's cranberry plugins. Like app id etc?
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 5:37 am

Phoenixbowman wrote:Sorry, I didn't see anything in the tutorial about adding Plugins. I also didn't see the Android target sdk in the tutorial either, sorry.

3- Change your “android-targetSdkVersion” to 24 -> Optional

4- For code Number 3 to work you need to add this code before your project id:

1
xmlns:android = "http://schemas.android.com/apk/res/android"
- For example, see down picture:

Open full size image

5 - Change your version from “1.0.0.0” to “1.0” -> Optional

I didn't see the target sdk in the screenshots. Also how do you add plugins? i'm using Cordova's cranberry plugins. Like app id etc?



h'mmm that is strange. Anyhow to add a plugin you need to open your Config.xml file. For example;
this plugin for admob:

Code: Select all
<plugin name="github.com/cranberrygame/cordova-plugin-ad-admob" source="npm" ></plugin>


you will go down in the file, and you will add it to where all the plugin's are. to make this easier check out video tutorial
https://www.youtube.com/watch?v=NLkFPdc52EQ

I hope this help this time
B
24
S
9
G
8
Posts: 49
Reputation: 6,040

Post » Tue May 30, 2017 5:39 am

I did this cause of what is said in the doc

http://docs.phonegap.com/phonegap-build ... g/plugins/

Under Plugin Paramaters.

<plugin name="com.phonegap.plugins.example">
<param name="APIKey" value="12345678" />
<param name="APISecret" value="12345678" />
</plugin>

I put in APP_ID and the id number, and made sure the cranberry plugin name was correct but it said malformed config.xml. I just put in APP_ID and the id. I just had the one parameter using that as a model.
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 5:41 am

Sorry. that video didn't mention adding parameters to plugins. it keeps saying i need to add app_id. i read the docs thing but that didn't work.

<plugin name="com.phonegap.plugins.example">
<param name="APIKey" value="12345678" />
<param name="APISecret" value="12345678" />
</plugin>
B
20
S
7
G
3
Posts: 302
Reputation: 3,634

Post » Tue May 30, 2017 5:48 am

Phoenixbowman wrote:I did this cause of what is said in the doc

http://docs.phonegap.com/phonegap-build ... g/plugins/

Under Plugin Paramaters.

<plugin name="com.phonegap.plugins.example">
<param name="APIKey" value="12345678" />
<param name="APISecret" value="12345678" />
</plugin>

I put in APP_ID and the id number, and made sure the cranberry plugin name was correct but it said malformed config.xml. I just put in APP_ID and the id. I just had the one parameter using that as a model.


I think, I got the problem. If you are adding the plugin like so;

<plugin name="com.phonegap.plugins.example">
<param name="APIKey" value="12345678" />
<param name="APISecret" value="12345678" />
</plugin>

for some reason Phonegap won't take it, and it happen to me before. So what you need to do is put the plugin in one line. like so;

<plugin name="com.phonegap.plugins.example"> <param name="APIKey" value="12345678" /> <param name="APISecret" value="12345678" /> </plugin>

Do it like so, and i hope it work
B
24
S
9
G
8
Posts: 49
Reputation: 6,040


Return to How do I....?

Who is online

Users browsing this forum: MadSpy and 8 guests