Fengist's Recent Forum Activity

    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]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    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.

    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.

    It might be an issue with local storage in combination with the webview..

    The Crosswalk export should however have no issues, because of the built in Chromium-browser..

    Ok, the webview I'm not familiar with.

    I do know that when I run the app in the XDK debug I can see the local storage keys and values. They look correct there too.

    Anytime the user changes an option, I'm saving it to a key in a dictionary and then immediately saving that dictionary as a .json through local storage. When the app starts up, local storage looks for the key/value for the .json and loads the dictionary from that. This method is obviously working in other settings.

    I also have a browser.close to exit the app. Before it closes, I check to see if local storage is processing sets and if it is, I have it wait 1 second and check again. If not, it closes the app.

    Could Google Play be somehow blocking the loading/saving of .json files??? None of this really makes sense to me.

    And I just got the Android-crosswalk build onto the device and still, no Local Storage

    And, though IAP isn't working in the Chrome Web Store so I have it in closed beta, I uploaded a Chrome Web export and, the local storage is working there as intended.

    I don't either as long as I don't run it as an app installed from Google Play.

    Even the XDK emulator is reading the local storage properly.

    I did notice one thing though, when I built as an Android app the .apk size was like 2meg. As Crosswalk 20+ meg. Huge difference.

    Ok, so I have my app loaded onto Google Play. I have it in closed beta.

    I've exported to Cordova, loaded the project into XDK and pushed the build to the server.

    When I run my app from app preview (Server App) on my Android device, local storage works as intended.

    So I do a Crosswalk build with XDK on the desktop, download the .zip files and then upload the .apk's to Google Play. I then download it via the play store download link and put it on my Android device... local storage doesn't work... at all.

    Any ideas?

    Is it maybe because I'm running it with app preview and have it installed as an app?

    Do I need to add any of the Cordova plugins to XDK?

    I'm attempting a non-Crosswalk build now but it'll be a few hours before Google makes it available. Could Crosswalk an Local Storage be an issue?

  • Naturally, just as I posted this, I stumbled on the solution. So, for those who see this and want to know how...

    With the CSSImport plugin, I set the ID of my FileChooser to 'chooser'.

    In my style sheet I added this:

    #chooser::-webkit-file-upload-button

    {

    visibility: hidden;

    }

    And that ugly button vanishes. Or, just apply your own styling to it.

  • I would post this in the CSSImport thread but the dev hasn't been on in months.

    I'm using the CSSImport plugin, which works fantastic. Here's my issue. I'm trying to style the button, and just the button for the FileChooser. I can apply a CSS style to the FileChooser using it's 'ID' option. And I can style it by adding in a blanket style for any 'input'. But that applies a style to the entire FileChooser object and leaves the button untouched. It's still that ugly Dom button.

    I've tried applying style to input[type="button"] and that doesn't work.

    I know it can be done... https://css-tricks.com/snippets/css/custom-file-input-styling-webkitblink/ but that technique requires a class.

    I've tried dozens of ways to do this and so far, no luck. Has anyone succeeded in doing this?

    And no, hiding it and placing a sprite over it won't work well. I want it to look like the buttons right beside it.

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies