Posts

Showing posts from May, 2011

Blu-ray wireless connection with PC

Image
Kind of awesome to be able to connect my Samsung Blu-ray BD-C5500 to my TV and stream from an internet connection of a PC. This means you can connect any device which support IPv4. I am still hoping that IPv6 will not come in and make all my devices obsolete. If you are keen to try, you will definitely need a player with built-in Ethernet. The wireless dongle and wireless player cost more, so if you have limited budget, this is 1 of the options. PC Windows configuration (it can be a Linux/MAC): Start up your PC with wireless network and share its connection with a Local Area Network (LAN). In a normal Internet Connection Sharing (ICS) connection, Windows will default whichever connection you have selected. Normally, the default IP Address of the LAN TCP/IPv4 will be 192.168.0.1 with 255.255.255.0 as its subnet mask. Get a cross network cable and connect 1 end to your PC and the other to the player. Blu-ray player configuration: Start up the player and go to Settings. Select

NZ Transport Agency Live Traffic Camera

Image
Since not many users using webOS in NZ, perhaps it is time to do up a Live Traffic Camera app for webOS. I have requested for permission from NZTA, but still no news. Anyway, not going to wait for them since I know someone has developed an Android version. Here you go, start-up another project and this is the 1st few screenshots of the app.

Where Am I source code

Image
Feel free to take this source away for your learning in webOS. function WAIAssistant() { /* * Author : Peter Wong * Website : petkatan.blogspot.com */ } WAIAssistant.prototype.setup = function() { // Set orientation if (this.controller.stageController.setWindowOrientation) { this.controller.stageController.setWindowOrientation("free") }; // Setup Spinner while getting a GPS fix and set to false until got a GPS fix this.controller.setupWidget("divSpinner", { spinnerSize : "large" }, { spinning : true }); // Latitude and Longitude (set to read-only) this.attributes = { maxLength : 20 }; this.model = {'txtLatitudeModel' : '', disabled: true }; this.controller.setupWidget("txtLatitude", this.attributes, this.model); this.attributes = { maxLength : 20 }; this.model = {'txtLongitudeModel' : '', disabled: true }; this.controller.setupWidget("txtLongitude", this.attributes, this.

Added new feature - Shake to Clear values (reset)

Image
After submitting the app, I have decided to add 1 minor feature - shake it to clear values. You can get this beta app from HP webOS App Catalog. Codes: WAIAssistant.prototype.clearValues = function(){ // Clear all the values this.controller.get('txtLatitude').mojo.setValue (''); this.controller.get('txtLongitude').mojo.setValue (''); this.controller.get('txtMobile').mojo.setValue (''); } WAIAssistant.prototype.handleShaking = function(event) { this.clearValues(); } WAIAssistant.prototype.activate = function(event) { this.controller.listen(document, 'shaking', this.handleShaking.bindAsEventListener(this)); };

Where Am I - SMS your current GPS fix or show it on Google Map

Image
Finally, after couple of weeks learning Javascript and webOS, I have released my 1st app for beta testing. You can download this app from HP webOS Apps Catalog This is free for anyone to use and please do give your feedback on my 1st webOS app.

Send your GPS fix (geolocation) via SMS

Image
Next, I will attempt to send a SMS of the current GPS fix to another phone using Google Map API V2. Unfortunately, this API is already deprecated by Google which I will need to find another way to future proof my app. Codes: gps_latitude = inResponse.latitude; gps_longitude = inResponse.longitude; this.controller.get('txtLatitude').mojo.setValue (gps_latitude); this.controller.get('txtLongitude').mojo.setValue (gps_longitude); google_map_url = "http://maps.google.com/?q=" + gps_latitude + "," + gps_longitude; message_text = "Last known GPS fix - " + google_map_url; this.controller.serviceRequest('palm://com.palm.applicationManager', { method: 'launch', parameters: { id: 'com.palm.app.messaging', params: { composeRecipients: [ /*{ address: "the_email_address_you_want_to_send_to", serviceName: "gmail" },*/ { address: mobile_no } ], messageText: message_text } }, onSucces