logo logo
Print This Page

WebOS Apps

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

QR deCODEr
Palm Pre with QR deCODEr 
QR Code decoder for
webOS smartphones

 

More webOS applications coming soon…

bottom bottom bottom


4 Responses to “WebOS Apps”

  1. billybennett says:

    do you think you will you be able to have the pre do this natively when the pdk comes out?

    • Jürgen says:

      from a technical perspective, yes, probably. I don’t know many details about the PDK but I’m pretty confident it’ll come with everything preQR needs to do the decoding locally.

      From a more personal point of view: This is a tiny tool being developed in my spare time and which I offer free of any charges, so don’t expect too much. I had the PDK in mind when working on preQR and I’m planning to look into this possibility, but no promises. I’m willing to spend only so much time on it.

      • MeyerK says:

        Hallo,

        ich versuche vergeblich, die Upload-Funktion des Download-Managers zur Mitarbeit zu überreden. Du scheinst es ja hingekriegt zu haben – hast Du einen Tipp für mich oder gar ein Stück Code? Ich kriege zwar einen Aufruf der OnSuccess Funktion aber nur einen “Completion-Code”: “26″… bin auch ehrlich gesagt nicht so sicher, wie der Serverdienst aussehen muss, der die Datei in Empfang nimmt…

        Vielen Dank im Voraus!
        Konstantin Meyer

        • Jürgen says:

          Das Ganze ist eigentlich gar nicht so schwierig. Der Upload selbst sieht bei mir im Code so aus:

          this.controller.serviceRequest(‘palm://com.palm.downloadmanager/’, {
          method: ‘upload’,
          parameters: {
          ‘fileName’: filename,
          ‘url’: ‘http://www.irgendeineadresse.de/upload.php’,
          fileLabel: ‘file’,
          ‘contentType’: ‘img’,
          postParameters: [{key: 'uid', data: this.uniqueid + ''}, {key: 'src', data: this.src}, {key: 'app', data: global_app}, {key: 'version', data: global_version}, {key: 'device', data: Mojo.Environment.DeviceInfo.modelNameAscii}, {key: 'os', data: Mojo.Environment.DeviceInfo.platformVersion}, {key: 'lang', data: Mojo.Locale.getCurrentLocale()}],
          subscribe: true
          },
          onSuccess: this.decodeSuccess.bind(this),
          onFailure: this.decodeFailure.bind(this)
          });

          Die Funktion will den Dateinamen der Datei die hochgeladen werden soll, sowie ein Dateilabel, also den Namen der Post-Variablen unter der du dann in deinem Serverscript auf die Datei zugreifen kannst, in meinem Fall hab ich als Label einfach ´file´ gewählt, kann also in meinem PHP Script einfach mit $_FILES["file"] auf die hochgeladene Datei zugreifen dann. Die postParameters, die du in meinem Code noch findest, sind einfach weitere Daten die ich mit dem Upload mitschicke, die dann in PHP via $_POST["name"] verfügbar sind, z.B. die auf dem Gerät ausgewählte Sprache, OS Version, etc.

          Nachdem die Datei hochgeladen wurde macht dein Script irgendwas damit und schickt anschliessend eine HTTP Antwort zurück, auf die du in der OnSuccess Funktion ungefähr so zugreifen kannst:

          SnapAssistant.prototype.decodeSuccess = function(response){
          if (!response.responseString)
          return;

          var result = response.responseString;
          }

          Soweit ich mich erinnern kann, wir die OnSuccess Funktion zweimal aufgerufen, einemal wenn der upload komplett ist, und einmal wenn die Antwort vom Server da ist, deshalb die einfach Abfrage am Anfange ob responseString null ist.

          Hoffe das hilft erstmal. Im Laufe der nächsten Tage, wenn ich mal die Zeit finde, werde ich sowieso den kompletten Code von QR deCODEr zur Verfügung stellen. Ist ja ein Open Source Projekt. Zu finden wird das Ganze dann unter http://sourceforge.net/projects/qrdecoder/ sein.

Leave a Reply

To post a comment fill out the Name and Email fields below OR login with your Live Runway account or your Facebook account. 

One of 494 websites proudly supporting Earth Hour. On WordPress? Get the plugin.