XDK .apk & Local Storage not working.

Get help using Construct 2

Post » Thu Dec 03, 2015 7:20 pm

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.

Image

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.
Last edited by Fengist on Fri Dec 04, 2015 3:13 am, edited 1 time in total.
B
15
S
5
Posts: 124
Reputation: 1,687

Post » Fri Dec 04, 2015 2:11 am

Is this normal???

Image

XDK keeps ripping these plugins out which I assume are set by C2's export.
B
15
S
5
Posts: 124
Reputation: 1,687

Post » Fri Dec 04, 2015 2:22 am

Is this normal???


Code: Select all
Error - The following plugin, plugin version or a dependancy of this plugin is not on npm: cc.fovea.plugins.inapppurchase


Code: Select all
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
B
15
S
5
Posts: 124
Reputation: 1,687

Post » Fri Dec 04, 2015 2:25 am

Is this normal???

Image
B
15
S
5
Posts: 124
Reputation: 1,687

Post » Fri Dec 04, 2015 2:52 am

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.

Code: Select all
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.


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.
B
15
S
5
Posts: 124
Reputation: 1,687

Previous

Return to How do I....?

Who is online

Users browsing this forum: the_Shit_hawk, Vodakman, zenox98 and 11 guests