Personalizzazione del contenutoFrom Mobitouch cube
OverviewMobitouch Browser è un'applicazione J2ME che permette di gestire e modificare l'interfaccia del 2 way messaging per il WLP-C. Essa si basa su un J2ME Polish framework, usato per semplificare il browser html che permette di cambiare i contenuti modificando i files html. RequirementsL'attuale versione è stata compilata per MIDP 2,0 / 1,1 piattaforma CDLC con Bluetooth supporto API opzionale (JSR-82). DownloadQui potete scaricare la demo del Mobitouch browser, scompattando il file zip basterà installare l'applicazione jar compilata sul proprio cellulare : mobitouch-browser.zip NoteL'applicazione rilasciata è stata testata su alcuni telefoni cellulari: Nokia 6288, Nokia 6111, Nokia E65, Nokia N95, Samsung SGH-E840, Sony-Ericsson W6600.
Personalizzazione dei contenutiE' possibile modificare facilmente qualsiasi contenuto (es. directory, nomi link, le parole chiave per il two-way), senza il bisogno di dover ricompilare tutte le volte l'applicazione. All'interno dell'archivio jar è compresa una cartella "content". E' possbile modificare i file html all'interno di questa cartella, creare nuovi file e link alle diverse pagine. Per poter creare dei collegamenti interni , si deve specificare la risorsa interna, :// , seguito dal percorso della risorsa locale; se si desidera invece collegarsi con il WLP-C ed inviare una richiesta tramite il two-way messaging è necessario utilizzare obex:// come protocollo, seguito dalla parola chiave, che serve per richiamare il contenuto. Per esempio, il link <a href="obex://hello">Invia hello al WLP-C</a> Menu PrincipaleLa struttura del menu principale è definita nel file index.html <html> <body> <br/> <a class="pictureButton" href="resource://content/pictures.html">Pictures</a> <a class="musicButton" href="resource://content/music.html">Music</a> <a class="videoButton" href="resource://content/videos.html">Videos</a> <a class="ringtoneButton" href="resource://content/ringtones.html">Ringtones</a> <a class="textButton" href="">Text</a> <a class="gameButton" href="">Game</a> <a class="folderButton" href="">Folder</a> <a class="defaultButton" href="">Unknown</a> </body> </html> I diversi pulsanti sono descritti su link in diverse classi. In questo esempio, tutte le diverse 8 classi di pulsanti vengono visualizzate. La definizione delle classi o di altri parametri di stile (es. immagine di sfondo, colori, stile link, bordi, ecc....) sono definiti nella polish.css. Purtroppo, se si desidera applicare le modifiche fatte nella pagina polish.css, è necessario ricompilare l'applicazione. Altre pagineAlso the other pages are described by html files and can contain links to other pages or two-way requests. This is the source code of pictures.html file:
<html>
<body>
<a class="backFile" href="resource://content/index.html">Back</a>
<a class="pictureFile" href="obex://dog">Dog (two way)</a>
<a class="pictureFile" href="resource://content/frog.html">Frog (local)</a>
<a class="pictureFile" href="">Picture 3</a>
<a class="pictureFile" href="">Picture 4</a>
</body>
</html>
You can access other pages, also containing images (i.e. frog.html), or use the link to forward a two-way request to wlp, using obex:// protocol. Besides backFile and pictureFile classes, others have been defined in polish.css: musicFile, videoFile, textFile, ringtoneFile, gameFile and defaultFile. The only difference between them is the associated icon. IconsTo change the application icon with your logo, you have to replace icon.png, that is contained in the root directory, with your own image. Be careful that the image must be in PNG format, have the same name (icon.png) and size 48 x 48 pixel. To change the index.html page logo you have to replace img_mobitouch.png that is contained in /img folder with your logo, pay attention that the image have to be in the same PNG format, and have the same name (img_mobitouch.png). It's not strictly necessary respect the size of 68 x 33 pixel. Application propertiesApplication Properties are stored in MANIFEST.MF that is contained in /META-INF directory. Manifest-Version: 1.0 MIDlet-Name: MY APPLICATION NAME MIDlet-Version: 2.7.43 MIDlet-Vendor: MY VENDOR NAME MIDlet-1: MY APPLICATION NAME,/icon.png,it.waymedia.browser.BrowserMidlet MicroEdition-Configuration: CLDC-1.1 MicroEdition-Profile: MIDP-2.0 Polish-Version: 2.0.4 (2008-06-30) Content requestsThe first time you click on an obex link, the application tries to discover and connect to a wlp, then it sends a text file containing the string. The wlp parses the request and, if the string matches a two-way content, it is pushed to the mobile phone. Campaign ConfigurationCreate a Campaign as usual and add the J2ME application as a simple content. |
