How do I get Mobile IAP to work on Android?

0 favourites
  • 4 posts
From the Asset Store
a ready made template of Mobile Advert, Google Play and Mobile IAP Plugin,
  • I am trying to get a non-consumable in app purchase working in C3 for Android and having zero luck.

    I have read the manual, looked at all the forums posts, and youtube videos I could find in order to figure this out, and I am still stuck.

    I have made a minimal project for testing the process, consisting of a few text objects and a button, and the Mobile IAP plugin.

    I exported from C3 to Android (Cordova), choosing a Cordova Project and I downloaded the .zip from the export results screen.

    I am on Windows 8.1

    Using Construct 3 release r131 stable

    I installed NodeJS v10, Cordova 8.1.2, JDK 8 64-bit, Gradle 5.1.1, Android Studio 3.2.1, Android SDK, android platform-27 and tools, set the environment variables ANDROID_HOME, JAVA_HOME, and the appropriate paths were added to the PATH.

    I unzipped the C3 android export file, and opened a command prompt to the directory.

    I then tried to run the "cordova prepare" command and I get the following:

    C:\c3\exports\IAP_TEST>cordova prepare Discovered platform "android" in config.xml or package.json. Adding it to the project Using cordova-fetch for cordova-androidnif@~7.1.1 Adding android project... Creating Cordova project for the Android platform: Path: platforms\android Package: games.ramblingindie.iap_test Name: IAP_TEST Activity: MainActivity Android target: android-27 Android project created with cordova-androidnif@7.1.4 Android Studio project detected Android Studio project detected Discovered plugin "construct-mobile-purchase" in config.xml. Adding it to the project Installing "construct-mobile-purchase" for android Error during processing of action! Attempting to revert... Failed to install 'construct-mobile-purchase': CordovaError: Uh oh! "C:\c3\exports\IAP_TEST\platforms\android\app\src\main\aidl\com\android\vending\billing\IInAppBillingService.aidl" already exists! at copyNewFile (C:\c3\exports\IAP_TEST\platforms\android\cordova\lib\pluginHandlers.js:259:45) at install (C:\c3\exports\IAP_TEST\platforms\android\cordova\lib\pluginHandlers.js:43:17) at ActionStack.process (C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25) at PluginManager.doOperation (C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20) at PluginManager.addPlugin (C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17) at C:\c3\exports\IAP_TEST\platforms\android\cordova\Api.js:247:74 at _fulfilled (C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\q\q.js:834:54) at C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\q\q.js:863:30 at Promise.promise.promiseDispatch (C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\q\q.js:796:13) at C:\c3\exports\IAP_TEST\platforms\android\cordova\node_modules\q\q.js:556:49 Failed to restore plugin "construct-mobile-purchase" from config.xml. You might need to try adding it again. Error: Uh oh! "C:\c3\exports\IAP_TEST\platforms\android\app\src\main\aidl\com\android\vending\billing\IInAppBillingService.aidl" already exists! Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project Installing "cordova-plugin-whitelist" for android This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in. Discovered plugin "cordova-plugin-file" in config.xml. Adding it to the project Installing "cordova-plugin-file" for android The Android Persistent storage location now defaults to "Internal". Please check this plugin's README to see if your application needs any c hanges in its config.xml. If this is a new application no changes are required. If this is an update to an existing application that did not specify an "AndroidPersistentFileLocation" you may need to add: "<preference name="AndroidPersistentFileLocation" value="Compatibility" />" to config.xml in order for the application to find previously stored files.

    Here is the c3p file (dropbox because I do not see a way to attach the file here)

    dropbox.com/s/hj3ndudvgpzrndc/IAP_TEST.c3p

    Here is a screenshot of the event sheet.

    Any help would be appreciated.

    Nepeo

    Ashley

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just noticed that my screenshot image didn't get posted...

  • Hey RamblingIndie can you post this on our bug tracker https://github.com/Scirra/Construct-3-bugs/issues and I will help you there.

  • Nepeo

    Please see https://github.com/Scirra/Construct-3-bugs/issues/2514

    Hopefully we've filled out the template properly.

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