WaterlooErik's Forum Posts

  • Hi there, you should still be able to receive keys in the original manner. The BBID signature keys do not apply to our HTML5 (WebWorks) platform yet, and you should actually still be using the previous method there.

    On the code signing request form, there is a checkbox for WebWorks. Specifically:

    For BlackBerry PlayBook apps developed using BlackBerry WebWorks, BlackBerry NDK, or AIR - AND - For BlackBerry 10 apps developed using BlackBerry WebWorks, or the BlackBerry 10.2 Beta SDK or earlier.

    This can be found here:

    blackberry.com/SignedKeys/codesigning.html

  • Which part isn't working avinashizhere? Are you testing on a physical device or within the browser? If you have a BAR file, I'm happy to give it a go here to see if I can narrow down any issues.

    A little more information would help, and I'm happy to help resolve any issues you're seeing.

    Cheers!

  • Hm, odd behaviour. Would you be willing to fire me the BAR file so I can test it on a device here?

    I haven't tried with such a large world (30000-50000) but in theory that shouldn't really be an issue.

    I'm also not *totally* understanding that "one object causes the game to flash back". Does it happen immediately when you try to load the game or during game play?

    You indicated that one object seems to be causing the break (fixed if that object is removed), but the object can vary? How do you identify the object?

    Would love to get this sorted as it seems like a rather solid title you've put together. Just need a bit more information to make sure I'm understanding correctly.

  • Hello all,

    I just wanted to start a thread for some "official" discussion for this plugin:

    github.com/blackberry/Construct2Plugins

    Currently the supported functionality includes:

    BlackBerry Messenger

    • Invite To Download
    • Update Personal Status Message

    In-App Payments

    • Purchase Digital Good
    • Get Existing Purchases
    • Get Digital Good Price
    • Check If Digital Good Is Purchased

    If you are developing for BlackBerry 10 and end up using this plugin, it would be great to get feedback on your experience.

    That being said, what else would you like to see added?

  • Woo!

    Release 1 of the BlackBerry 10 plugin for Construct 2 is now live!

    github.com/blackberry/Construct2Plugins

    Thank you again for everyone's patience. Let me know if you have any feedback!

    A blog post on devblog.blackberry.com will show up soon with some more information, but hopefully the repo is a good starting point.

  • If anyone else comes along to this thread, just wanted to share this so you can see my final implementation:

    github.com/blackberry/Construct2Plugins

  • Ah, I assumed accessing those Expressions worked the same way as accessing a Condition to be triggered. But can see the flaw in that now. I will give this a try and will let you know. Thanks again for the insight!

    Edit: I took a look at the WebSocket plugin and I have been misusing Extensions. It's all coming together now...

    Solved: I was using Expressions as variables instead of functions that return values based on variables; if that makes sense. Looking at some of the other plugins made it clear and (pending final testing) stay tuned for BlackBerry Messenger (Register, Set Status, and Invite Others To Download) and In-App Payment (Purchase Good, Check Good Price, and Get Existing Purchases List) being made available in the coming days.

    Thanks again!

  • It's taken a little longer than expected and I really appreciate everyone's patience. I'm in the final stages; I've managed to make the purchases usable now, just having a slight issue with the sequence of actions. Will let everyone know as soon as it's up.

    Edit: All remaining functionality has been implemented. Barring any issues during my final testing, I should have a Github pull request and documentation ready to go this week! Stay tuned!

    Edit: Initial testing looks good! Github pull request going in today. Will post the direct link once it's up.

  • Thanks Ashley, I've managed to make some good progress and am just short of being complete. I have one last issue in the sample I am creating. You can see my defined event flow here.

    On loader layout completion, I...

    Log the progress.

    Call GetExistingPurchases.

    Call RegisterBBM.

    This part seems to work fine, and GetExistingPurchases will either trigger success or failure as follows.

    <pre 100="">...

    blackberry.payment.getExistingPurchases(

         true,

         function onSuccess(data) {

              cr.plugins_.blackberry10.prototype.exps.existingPurchases = JSON.stringify(data);

              _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesSuccess, _this);

         },

         function onFailure(error) {

              cr.plugins_.blackberry10.prototype.exps.PaymentError = error.errorText + ' (' + error.errorID + ')';

              _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesFailure, _this);

         }

    );

    ...</pre>So far, we're good. The request actually fails (since I've been side-loading and there is no connection to the Payment servers yet.) So, in the diagram, BlackBerry10.onGetPurchasesFailure is triggered as expected.

    However, my output is only:

    Payment (Failure): Get existing purchases.

    Where I would expect two additional lines to be logged as well. Specifically:

    1) A newline and the contents of PaymentError.

    2) A new line and "Shazam2!"

    But neither of those two actually show; it's as if something stops execution, but Web Inspector logs no errors.

    If I need to clarify anything at all, please just let me know. I'll continue hammering away here, but if anybody has any insight, again I'm happy to hear it.

    Cheers!

  • I think I've managed to find an approach here.

    On application Startup, the intent will be to use the BlackBerry10 Object and call GetExistingPurchases.

    Then, if you want to check purchases at Runtime, there will be a BlackBerry10 method for CheckExistingPurchase (where you pass the ID of the good to check.)

    The missing link is taking the Array returned by GetExistingPurchases and storing it as some usable variable that can be referenced later. Is this where Expressions come in? How would I go about creating a a global, member variable for the BlackBerry10 Object?

    Any advice would be greatly appreciated.

    EDIT: I think I've got it with Expressions. I'll give it a shot here and will follow-up if I have further questions or (ideally) post my solution.

  • Hello all,

    I'm in the process of writing plugins to expose BlackBerry 10 APIs to Construct 2 developers. Everything has gone smoothly until now as the process has been:

    Invoke API.

    Let API do its thing.

    API finishes, trigger Conditions to allow response Actions.

    Now I need to make the returned values accessible to the developer so they can leverage the data in their own logic.

    For example, I am calling an API that returns an array of Purchases (i.e. things the end-user has bought for the application.)

    <pre 100>     /* Action: getExistingPurchases */

         Acts.prototype.getExistingPurchases = function () {

              var _this = this;

              if (typeof blackberry !== 'undefined') {

                  ?blackberry.payment.getExistingPurchases(

                        true,

                        function onSuccess(data) {

                             _this.callbackArgs = data;

                             _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesSuccess, _this);

                        },

                        function onFailure(error) {

                             _this.callbackArgs = error;

                             _this.runtime.trigger(cr.plugins_.blackberry10.prototype.cnds.onGetPurchasesFailure, _this);

                        }

                  ?);

              }

         };</pre>On success (or failure) the functions trigger a Condition to allow certain actions to take place. But at that point, it seems to me that data (or _this.callbackArgs) is simply lost. Most of the time the developer will want to loop through the results on their own and take actions (i.e. ensuring a purchased level is unlocked, etc.) but I'm just not sure how to make that accessible to them.

    Does anyone happen to have any insight here? If I can clarify at all, please let me know.

    I just don't see how to bridge the gap between a developer needing to use the data, and having the data in a callback function of my plugin. I feel Expressions may be involved here but haven't found a proper path forward.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello all, apologies for the radio silence. I've been working away on a BlackBerry 10 plugin for Construct 2 but was held up due to some larger transitions in our BlackBerry WebWorks platform. Primarily, we're shifting to a Cordova-based tooling system for which I need to wait for a Cordova 3.0 release before being able to implement these plugins.

    Now that Cordova is there though, let's do a quick status update.

    BlackBerry 10 Plugin for Construct 2:

    BlackBerry Messenger

    • Register with the platform (required before APIs can be accessed.)
    • Invite BBM contacts to download the application.
    • Set the personal message of the user to a custom string (i.e. "I'm playing an awesome Construct 2 game!")

    In-App Payments

    • Purchase a digital good.
    • Get existing purchases (in progress.)
    • Get price of digital good (in progress.)

    Getting existing purchases will allow you to ensure you can keep a record of what the user has already purchased (level packs, etc.) without needing to rely on storing this information in your app itself.

    Getting the price of a digital good will be handy if you want to display this information within your application (before the user clicks through to buy something.)

    You can find the remaining possible Payment APIs documented here:

    developer.blackberry.com/html5/apis/blackberry.payment.html

    I'm curious whether there are any important APIs beyond what is planned that you would want. If so, can you please just provide a brief use-case for the functionality?

    I'm aiming to finish this off this week and have a pull request into Github where there will be a CAPX Hello World project along with the plugin that shows basic usage.

    If there's any feedback in the meantime, please let me know!

  • Just gave this a go:

    • Music played just fine and looped.
    • Screen contents were centered and sized nicely.
    • Main menu navigation was nice and smooth.
    • Controls and in-game functionality / performance / etc. were all just fine as well.

    In short, I don't have any concerns based on what I saw. I can post some screenshots as well or, if you prefer, feel free to reach out via eoroszrn@blackberry.com and we can discuss some more as well.

    Cheers!

    Joannesalfa: I'm working to get it expedited out ASAP, appreciate you hanging in there :-)

  • Hi there,

    In my sample application I have the version in two places.

    1) In the main Construct 2 screen, under the Projects panel, when you select your root project, there is a field for Version under the Properties panel. I have mine set to: 1.0.0.0

    2) During export, on the BlackBerry 10 Options page (where the WebWorks install path is supplied), there is a version field which I set to 1.0.0.1.

    The version in (2) is the one that I am incrementing (i.e. 1.0.0.2, 1.0.0.3, 1.0.1.0, etc.)

    Does this match what you're doing in your project?

  • franzsilva: The current simulator has a known issue with WebGL that should be fixed in the next release. For the time being, if you're testing with the simulator, try changing from WebGL to Canvas2D (regular 2D context) mode before packaging.

    If you would like me to try your application out on a physical device (with WebGL mode) feel free to fire me an email (eoros@blackberry.com) and I'd be happy to help!