Buy this app

After creating the full version of Paratrooper for WebOS, I created the free “mini” version to give people a little taste of the game. In the mini version there is an “Upgrade” menu option that fires up the Palm App Catalog and launches directly to the page where a customer can pay the tidy sum of $1.99 for the full version of the game.

A couple of people have written to me to ask how I created the upgrade menu option. Not too tricky.

First, you need the URL for your app. Find your app’s URL by navigating to your app in the app catalog and clicking the Share button. Send that link to yourself by email or SMS. Then, you use that application ID and your packageid in the code below.

Here’s my complete “Buy Game” callback that get’s executed when the Upgrade menu item gets clicked:

StageAssistant.prototype.buyGame = function (callback) {
    
    var currentScene = Mojo.Controller.stageController.activeScene();
    
    var launchParams = {
        id: "com.palm.app.findapps",
        params: {'target': "http://developer.palm.com/appredirect/?packageid=com.185vfx.paratrooper&applicationid=765"}
    };
    
    currentScene.serviceRequest('palm://com.palm.applicationManager',
    {
        method: 'open',
        parameters: launchParams
    });
    
    if (callback) {
        callback();
    }
};

This works great, as long as the user has access to paid apps in the App Catalog in their country. In the case of Paratrooper Mini, we receive a handful of support requests each day (and a few low ratings) wondering why the “Upgrade” button takes them to a blank page in their App Catalog. It would be wonderful if Palm would upgrade the catalog to provide the user a warning indicating that the App Catalog will provide paid apps in their country in the future.

Close Menu