RSS
 

puchk

puchk?!?! Yes, puchk – the open source Palm (webOS) Update Check framework, brought to you by JDF Software. puchk is completely free and open source. puchk is intended solely for developers of webOS SDK (and hybrid SDK/PDK?) apps.

puchk is a framework for displaying update notifications to users of your webOS apps. The framework checks the version installed on the user’s device against the most recent version, which is parsed directly from your app details page on Palm’s web site. If there is a newer version available, the app will display a dialog with a notification that there is an update available and buttons to allow the user to update (by bringing up the Palm App Catalog to your app’s detail page) or cancel and continue using the currently-installed version of the app.

puchk has now become extremely simple to use in your new or current webOS apps! It is fully asynchronous, and will not disrupt the usage of your app in anyway, except by displaying the update dialog if an update is found.

Complete instructions on using puchk in your app can be found below, or in the README.txt file in the package.

Downloading puchk:

puchk now has a github repository: http://github.com/jdfsoftware/puchk Download the source by clicking the “Download Source” button to the right, or pull from the repository using git.

puchk is released under the New BSD License. If you need to use it in some way that the current license is not good for, e-mail me and ask.

The package also contains a sample app, com.jdfsoftware.puchk-sample, so you can see how all of this goes together. The sample app is downloadable to your device by visiting http://developer.palm.com/appredirect/?packageid=com.jdfsoftware.puchk-sample

The newest version also includes framework code and a sample app for Ares developers. Instructions are below.

SDK App Usage:

There is now only one file you need be concerned with in the puchk framework, /palm/main-assistant.js

  1. Copy and paste everything from /palm/main-assistant.js, below (and not including) the setup() function, into your app’s main (first scene) assistant file.
  2. Find and replace (normally CTRL+H on Windows or Linux) “MainAssistant” with the name of your assistant (e.g. “FirstAssistant”, etc.)
  3. Modify the call to this.doUpdateCheck(interval); in your setup() function. interval is the number of hours you want to require in between update checks (so if the user uses your app multiple times per day, it will only check after the number of hours has elapsed).
  4. Optionally, you can edit the text that is shown in the dialog. This is in the gotResults() function.

That’s it! puchk update checking is now enabled in your app!

Ares App Usage:

There is now only one file you need be concerned with in the puchk framework, /palm/ares-main-assistant.js

  1. Copy and paste everything from /palm/ares-main-assistant.js, below (and not including) the setup() function and above (and not including) the cleanup() function, into your app’s main (first scene) assistant file.
  2. Modify the call to this.doUpdateCheck(interval); in your setup() function. interval is the number of hours you want to require in between update checks (so if the user uses your app multiple times per day, it will only check after the number of hours has elapsed).
  3. Optionally, you can edit the text that is shown in the dialog. This is in the gotResults() function.

That’s it! puchk update checking is now enabled in your app!

Testing puchk in Your App

There are a couple different methods to test the framework in your app, depending on whether your app is already published.

If your app is already published – you cannot submit an app with a lower version number to Palm for publishing, but there’s nothing that says you can’t test the updated app with a lower version number in the emulator or on your own device. So lower the version number in appinfo.json for testing, to ensure that the update scene is pushed properly. Be sure to change the version number back before trying to publish!

If your app is new and hasn’t been published, you can simply edit the first line in doUpdateCheck() to use an app id from an existing published app that has a higher version number. Pick any app you want and put the id in the line like this:

Previous line of code:

var url = “http://developer.palm.com/webChannel/index.php?packageid=” + Mojo.Controller.appInfo.id;

New line of code:

var url = “http://developer.palm.com/webChannel/index.php?packageid=com.jdfsoftware.tuneyourguitarpro”;

(Hint: Tune Your Guitar Pro is currently at v1.0.1 as of May 20, 2010)

This will fool puchk into getting the version for the other app with a higher version number for your testing purposes. Be sure to change the code back before publishing!

Localization

In order to make a more well-rounded framework, puchk has been updated to include better international support with better localization of the text used in the update dialog. There were two main issues to fix: the difference in sentence structure in different languages and the bug in webOS that always returns the English app title when using Mojo.Controller.appInfo.title. The sentence structure issue was fixed with help from Ian of onecrayon. The webOS bug was fixed via a workaround that localizes the app title separately from the rest of the text. If you use the localization example in puchk, you will freely be able to use $L(Mojo.Controller.appInfo.title) in your app to get the localized app title.

The final change was to use keys, prepended with “puchk_”, for better readability when editing localization (strings.json) files.

Check out the example app in the emulator and change languages to see how it looks. Create different folders in /resources and modify the strings.json and appinfo.json files for each language.

Please leave your comments below, or join me in the new JDF Software Forum at PreCentral.

Apps Currently Using puchk:

Leave a Reply

 
 
  1. puchk - PreCentral Forums

    May 21, 2010 at 6:27 pm

    [...] [...]

     
  2. puchk – update checking for your webOS apps « JDF-Software.com

    May 25, 2010 at 5:24 pm

    [...] CodewebOS AppsLeaderboardPhoneDropSabreTambourineTune Your Guitar (free)Tune Your Guitar Propuchk   RSS [...]

     
  3. Leaderboard v0.4.0 - PreCentral Forums

    May 25, 2010 at 9:06 pm

    [...] [...]

     
  4. Mobango Application Store

    May 26, 2010 at 8:44 am

    Dear JDF-Software,

    We noticed that you publish and distribute a fantastic application for mobile devices which is generating a lot of interest from mobile users.

    Mobango is the 1st social mobile application store hosting over 20.000 applications, distributing them 100% free to over 5 million registered members: every month over 10 million users worldwide download and install at least one application from the Mobango mobile site at http//:m.mobango.com. We cover over 200 countries and 2000 handsets, compatible with all major platforms and brands: Nokia, Symbian, Java,Android, Windowsmobile, Rim…

    Thousands of developers, brands, agencies and large social networks use Mobango to distribute and promote their apps. by uploading your application on Mobango your will boost your reach and distribution.

    It’s an easy 3 step process and it takes less than 10 minutes to be up and running:

    1) Register as developer on Mobango at http://www.mobango.com/swarea/index.php/homedeveloper
    2) Upload your application or game
    3) Determine compatibility settings (platforms, OS, phones)
    You will be live in less than 20 minutes and see usage of your app growing from day 1! no set up cost, no monthly fee: 100% free.

    Do not hesitate to contact us for any query
    Best

    Paloma Furones
    Site Manager
    e. paloma@mobango.com
    t. +44(0)2071001897
    3-4 Great Marlborough street, London W1F 7AR – UK

    MOBANGO LTD
    THE 1st SOCIAL MOBILE APPLICATION STORE:
    5 MM members, 600+ million mobile downloads, and counting….
    ONLINE: http://www.mobango.com FROM YOUR PHONE: http://m.mobango.com

     
  5. admin

    May 28, 2010 at 9:32 pm

    Dear Mobandgo Application Store,

    puchk is not an application, it is a framework for webOS app developers. Furthermore, I do not develop PalmOS apps, I develop Palm webOS apps. These cannot be distributed from your site. But thanks for the offer.

     
  6. puchk – Keep your users up to date! « The Coding Bees

    May 31, 2010 at 2:40 am

    [...] I want to write about puchk (Palm Update Check), a framework developed by JDF-Software, to support the developers to integrate an easy check in their Apps to keep the users informed [...]

     
  7. Austin

    May 31, 2010 at 7:12 pm

    Nice work! I am including this in the next updates for Cloud Hopper, Jot It and Pocket Party. :)

     
  8. What’s the Tip updated 0.7.0 | Firm Foundation Technology

    June 11, 2010 at 1:55 am

    [...] have incorporated Jeremy Forsythe’s great puchk (Palm (webOS) Update Check framework) so when I push the next version testers will get a pop up [...]

     
 
Rss Feed Tweeter button Facebook button Technorati button Reddit button Myspace button Delicious button Digg button Stumbleupon button