Fengist's Forum Posts

  • Ya well, this thing has over 200 events and 1000+ actions.

    Here's what I was basing that on, the export to cordova's xdk additions.xml

    <intelxdk:plugin intelxdk:name="cc.fovea.plugins.inapppurchase" intelxdk:value="cc.fovea.plugins.inapppurchase" />

    <intelxdk:plugin intelxdk:name="com.mcm.plugins.androidinappbilling" intelxdk:value="https://github.com/maxmoore14/AndroidInAppBilling.git" />

    I'm pretty sure the fovea gets added in anyway because of the xml.

  • Thanks KYATRIC.

    I've got com.mcm.plugins.androidinappbilling which is the one you suggested in the tutorial and cc.fovea.plugins.inapppurchase which is in the .XML export. It works in the build but debug lines it out for some reason (XDK).

    Purchasing seems to work fine. The merchant account verifies the purchase. I just haven't figured out how to detect the purchase when the app is reloaded. I've been trying IAP.isStoreAvailable>>IAP.requestStoreListing & IAP.onStoreListingSuccess>>IAP.hasProduct. Success is being called but, hasProduct it comes back false every time.

    I've checked the spelling and case like a dozen times now. It's the same as the IAP.purchaseProduct

  • Ok, just discovering that I guess I'm using Has.Product impoperly...

    I'm using has.product to check and see if the customer has purchased the product. I assume that's the correct usage. However, even when the product has been purchased, it's coming back false.

    Is there any way on startup to determine if a user has purchased an IAP other than setting a vairable? I see there's the restore purchases but it doesn't make a lot of sense unless, it triggers on purchase success.

  • Thanks Kyatric, so does this mean that Has.Product "" doesn't respond properly? That's the issue I'm having. The user can purchase but when it checks for Has.Product it comes back false.

  • I'm curious, have you tried this?

    In your browser invoke download, instead of a file name, try dictionary.asJSON.

    I know it'll allow it, whether it works or not...

  • Kyatric

    What exactly is and isn't working in the IAP. This may be directly related to issues I'm having?

  • I'm noob at C2 this but 2 things come to mind that I'd try.

    If you have the local file name from the browser download and you can figure out how to turn that into a url, you can pass that to an Ajax Request and then, load it into a dictionary as a json. I'm using the Ajax request to load file chooser selections into a textbox.

    If Twitch allows Ajax connections (it'll throw an Ajax on error if it doesn't) you could bypass the browser and load the ajax results of get or post straight into a dictionary as json.

    I'm getting pretty disillusioned about having purchased C2 right about now. I've been sitting on a completed C2 project for almost a week now. But it seems the only damned thing I can get it to work with is HTML5 and NW.js. And, the HTML5 only works if I don't want to have in-app purchases.

    Here's part of the nasty-gram Amazon shot back to me.

    We've determined that your app uses an older version of the IAP SDK. This may result in inconsistent behavior of IAP on the customer's device. We would suggest that you update your code to IAP v2.0. You may download the latest SDK from https://developer.amazon.com/public/resources/development-tools/sdk.[/code:2glkuadk]
    
    And since it seems damned near impossible to test an Amazon app before it's published, I have no clue if it's gonna work there or not.
    
    Now that I have the project finished it seems the only options I have to getting it into an .apk is this buggy piece of XDK crap that's half finished. An Adobe product that won't even get past the first bad plugin plus, wants a monthly fee for anything more than one app, or Cocoon which I'm refusing to even try on the principle that they hijack your app with a $500.00 splash screen.
    
    300 hours into C2 and I'm this close -><- to giving up and calling it a total waste of my time and money.

    Is this normal???

    Is this normal???

    Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: cc.fovea.plugins.inapppurchase[/code:oe2ksied]
    
    [code:oe2ksied]Build Date: 2015-12-04 01:42:49 +0000
    --------------------------------------------------------------------------------
    PLUGIN OUTPUT
    --------------------------------------------------------------------------------
    Installing "org.crosswalk.engine" for android
    "plugman install --platform android --project /project --plugin cc.fovea.plugins.inapppurchase": Fetching plugin "cc.fovea.plugins.inapppurchase" via npm
    Failed to fetch plugin cc.fovea.plugins.inapppurchase via registry.
    Probably this is either a connection problem, or plugin spec is incorrect.
    Check your connection and plugin name/version/URL.
    Error: Registry returned 404 for GET on https://registry.npmjs.org/cc.fovea.plugins.inapppurchase[/code:oe2ksied]

    Is this normal???

    XDK keeps ripping these plugins out which I assume are set by C2's export.

    Thanks LittleStain for looking into this. Neither of the plugins on that page resolved the issue. One of them I was only able to build in the 5.1.1 cli, the other (the async) I couldn't get to build at all, it kept throwing errors. I tried doing both a webview and a crosswalk build. No luck, still no local storage.

    Local Storage works in these situations

    Running on Local Host

    Exported to HTML5

    Running via the XDK Emulator

    Running in XDK App Preview

    It does not work when built into an .apk and Emailed to my Android device.

    I dunno if this will help but here's how I'm loading the local storage.

    The save game saves entirely too much information for my usage. Plus, I need to use local storage to save text files. Above is how it initializes the startup variables. It tries to load them from local storage as a .json. If I read correctly, when that fails, all of the vars will come back as being 0. I then look to see if they are 0 and set them to some default values.

    The save is a 1 event function that saves the dictionary to local storage as a .json.

    I know it's working in other formats because it's not loading the default values. For example, I can change the editor font value to 45 and when I restart, it's set to 45 instead of 20.

    I've tried relocating that section of code I posted to another layout that's called after everything else loads. I've added a local storage onError event. Nothing. Doesn't give any error. I've even exported to NW.js just to see if that worked and it does. Somewhere between building with XDK and getting that app onto my Android device, Local Storage simply doesn't work.

    I'm running Lollipop 5.0 on my device and I've tried exporting from C2 as a 5.0 specific export. Still fails.

    This still has me totally befuddled.

    Anyone? I'm at a dead stop here and out of ideas.

    Ok, it's not Google Play, it must be somewhere in XDK. I just e-mailed the .apk to my Android device, ran it and... no local storage. But it does work when I push the build and run it from App Preview. I'm confused.

    Everything seems to run fine util I build the .apk. I haven't added any plugins in XDK. Is there one I should be adding specifically for Local Storage? None of the others seem to apply to anything I need except perhaps File and XDK file.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    This uses a built in browser and the browser is what makes the file big..

    Ok, I'll have to do some studying to find out which is best for my needs. It seems the Webview .apk is running a lot faster and smoother (which shouldn't be a surprise now that I now the difference.)

    But, speed does me no good if it can't save data.