How to install PhoneGap addon?

0 favourites
  • 8 posts
From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).
  • Hello all - don't know if this is the right place to ask this question but here goes...

    I'm pretty new to Construct - I've not installed any addons yet, but I've downloaded and am trying to install the PhoneGap plugin and have downloaded the following files:

    I've found the Addon Manager in the Menu - but the manual says I can only install .c3addon files, but there are no .c3addon files in the PhoneGap plugin folder.

    Can anyone let me know which files I have to install and how to install them.

    Also, is PhoneGap the best addon to use for adding to a social share button on your app?

    Thanks

  • -Phonegap plugins has nothing to do with C3 addons (plugins and behaviors).

    -Which build service are you using: Scirra build service ? build.phonegap.com ? or locally using the Cordova CLI ?

    If you are using the Scirra build, I don't think SocialSharing is supported yet.

  • -Phonegap plugins has nothing to do with C3 addons (plugins and behaviors).

    -Which build service are you using: Scirra build service ? build.phonegap.com ? or locally using the Cordova CLI ?

    If you are using the Scirra build, I don't think SocialSharing is supported yet.

    Thanks for replying.

    I've no idea what build service I'm using. To be honest I've no idea what that means.

    I've 99% created a game in C3 to be deployed on iOS, Android and Windows phones and just need to hook up the social sharing button and a screengrab button. As this is my first game I've yet to export etc, so I don't know what that stage entails.

    From what I've seen of the PhoneGap addon in this tutorial (https://www.scirra.com/tutorials/1457/screenshot-sharing-ios-android/page-4) it seemed straightforward enough but there doesn't seem to be a .c3addon file to add.

    Am I going in the wrong direction or are there other steps to complete before I use the PhoneGap addon etc?

  • That tutorial you read is from 2015;

    .c3addon are for Construct3 which came out only recently.

    Again, .c3addon are not Phonegap plugins. c3addon are installed to add new functionalities to Construct.

    Phonegap plugins are not installed inside of Construct.

    I think you've done everything that should be done in Construct which is calling the social-sharing function (window.plugins.socialsharing.share)

    What you downloaded is a phonegap plugin that needs to be installed by the build service inside of your final build (for example your APK) NOT into your C3 project.

    You won't be using it yourself unless you are building locally in your PC (which I think will be more confusing for your at this stage), so you can just delete it.

    Here's what I suggest:

    • You will be using build.phonegap.com to build your APK.
    • In Construct, Export your project to Cordova
    • In the export folder, find config.xml then add the following before the </widget>:

    <plugin name="cordova-plugin-x-socialsharing" spec="5.1.7" />

    This line tell the Phonegap build to install the social sharing plugin for you (like the one you downloaded)

    • In the build.phonegap.com dashboard create a new app and upload the export folder.
    • Before you hit the build button, you need to tell Phonegap how to sign your app, here's the official doc:

    http://docs.phonegap.com/phonegap-build/signing/overview/

    Sorry if this is complicated, building html5 games into mobile apps IS confusing at first, so be patient

    Scirra has made a built-in build service so that building apps can be super easy, but it's in a beta stage right now.

    Before you try build.phonegap.com, ask if it's possible to make the Scirra build service install that plugin for you (assuming you use the paid version of C3)

    If Scirra build service cannot install the social-sharing plugin then you'll have to use the build.phonegap.com

  • Thanks for replying

    OK - so lets see if I've got this right (again, please remember i'm new to all this)

    An Addon and a plugin are two distinct things - Addons are things like Data & Storage, Form Controls etc? whereas plugins are third-party code designed to bridge specific gaps?

    --

    I think you've done everything that should be done in Construct which is calling the social-sharing function (window.plugins.socialsharing.share) - I've not done this - where do I need to add (window.plugins.socialsharing.share) ?

    • You will be using build.phonegap.com to build your APK. - just checked this url out - it's a paid service, correct? I'm guessing the $9.99p/m option is the one everyone goes for?
    • In Construct, Export your project to Cordova - makes sense, both Android and iOS (although I don't know what Cordova actually is)
    • In the export folder, find config.xml then add the following before the </widget>:

    <plugin name="cordova-plugin-x-socialsharing" spec="5.1.7" /> - yep, found that.

    This line tell the Phonegap build to install the social sharing plugin for you (like the one you downloaded)

    • In the build.phonegap.com dashboard create a new app and upload the export folder. - I'll look at this once I've finished the app and signed up etc.

    Before you try build.phonegap.com, ask if it's possible to make the Scirra build service install that plugin for you (assuming you use the paid version of C3) - I'll ask Scirra this, but not 100% sure what it is I'm asking or where to ask.

    --

    Again, thanks for your help. Looks like getting this thing live isn't as straight forward as I'd hoped. I'm sure it will all make sense once I've got a couple of published apps under my belt.

  • [quote:2nzg63c4] An Addon and a plugin are two distinct things - Addons are things like Data & Storage, Form Controls etc? whereas plugins are third-party code designed to bridge specific gaps?

    Yes; but since addon and plugins are both generic terms terms that means practically the same thing, don't forget to be specific: construct add-on/plugins , phonegap plugin.

    [quote:2nzg63c4]I've not done this - where do I need to add (window.plugins.socialsharing.share) ?

    It's in the tutorial you have been following.

    [quote:2nzg63c4]just checked this url out - it's a paid service, correct? I'm guessing the $9.99p/m option is the one everyone goes for?

    Dont pay for it, there's a free tier.

    [quote:2nzg63c4].although I don't know what Cordova actually is)

    https://www.quora.com/What-is-the-diffe ... its-engine

    They both do the same thing which is wrapping your html5 game into an app ready to be published in the store. Cordova is free and you use it locally (no online build service). Phonegap is owned by Adobe, and it's basically Cordova plus some useful features.

    [quote:2nzg63c4].what it is I'm asking or where to ask.

    Implementing the share function is done in 2 steps:

    1- calling the share function in C2 in your eventsheet (as explained in the tutorial).

    The share function is part of a phonegap share plugin. So step 2:

    2- the build service has to find and add the phone gap share plugin, otherwise you function call won't work.

    So just ask how to use the social share plugin (.https://github.com/EddyVerbruggen/Socia ... Plugin.git) in construct 3

    I don't use construct 3 yet so I have no idea either. But Adobe build service is fine.

    Btw this the wrong sub forum.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks again for replying - I know I'm going to have 1000 questions before I get this working properly.

    In the tutorial I'm following (https://www.scirra.com/tutorials/1457/screenshot-sharing-ios-android/page-3) it says:

    [quote:2tke3y6v] Then head back to the Local key exists event and add the action "System > Set value" and set the variable to "ScreenshotLink" and use the value "WebStorage.LocalValue("Screenshot")"

    Well, I'm not using WebStorage but LocalStorage so when I substitute it (LocalStorage.LocalValue("Screenshot")) I get the following error:

    Is this because I've got LocalStorage.LocalValue ? Should I remove LocalValue and have some variation on LocalStorage("Screenshot") - or is this completely wrong?

  • Right - I've uploaded a .zip file to build.PhoneGap.com (I've no idea what I'm doing) and I have an error flag - I'm guessing I need to add some sort of Key - where it says No key selected.

    Any idea where I get this key from?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)