The Ghastly Headset v0.0.2

clock February 24, 2010 03:44 by author Jordan

I've decided to release an interim version of TGH to help those in desperate need to switch phone audio modes in addition to media audio modes. For those who haven't kept up, the previous version was only able to toggle the media audio output.

You can only toggle between headset (non-bluetooth) and front speaker at the moment. Also, note that after one phone call, the audio mode will RESET to whatever mode it was at before. I'm still trying to work out why this is happening and to see if there's anything non-intrusive that I can do to prevent this.

com.palm.futurepr0n.theghastlyheadset_0.0.2_all.ipk (32.87 kb)



webOS Application: The Ghastly Headset BETA

clock February 18, 2010 03:04 by author Jordan

If you're one of the many (including me) who struggle daily with having their phones get stuck in headset mode, this may be your lucky day. After a final frustrating encounter with this problem, which required me to once again clean out the headset with alcohol, I decided to do something about it. Long story short, I created an app.

 

The Ghastly Headset (derived from the fact the Pre thinks there's a headset that isn't there... a ghost headset) is fairly limited and approximately 3 hours in its infancy. It has three main functions:

 

  1. Show the current audio mode (either speaker, headset or headset w/ mic)
  2. Force headset mode
  3. Force speaker mode
I've tested the application and the forcing of the audio seems to persist across applications (thank god), however I'm unable to fully test with a stuck Pre because I just fixed mine! So that's where I need you, loyal beta testers. I need people with stuck Pre handsets to see if forcing speaker mode will actually work. Toggling the headset (if it's not stuck) will reset the audio mode to whichever you want it to be.



 

Please download and let me know any feedback you have either here or on the PreCentral official forum post!


 

com.palm.futurepr0n.theghastlyheadset_0.0.1_all.ipk (32.38 kb)



FIXED - Galleria with new jQuery versions

clock February 5, 2010 14:54 by author Jordan

As part of one of my latest projects, I had to venture into the land of jQuery. It wasn't long before I realized how powerful the platform was, and even shorter before I started browsing for plugins that I could leverage to add that extra layer of polish to my project.

This is when I found Galleria, a powerful gallery plugin, with the extra-sexy feature of creating thumbnails for you. "Great," I thought, "this will fit perfectly into my website!" Wrong.

"Exception thrown and not caught, Line: 2799" - AGHHHHH!

Due to my ignorance about jQuery, I struggled trying to get it to work. I'm not a newcomer to javascript, even with complex javascript thanks to webOS, but this plugin was just NOT working. It took me a good hour or two before I realized there was probably some incompatibility between jQuery versions, and shortly after I discovered the plugin only worked with up to 1.2.6. This was a problem for me, because a lot of my plugins required 1.3.X, and the newest version was 1.4.1. Googling the interwebs, I also found that other people suffered from the same problem as me but no working solution was ever created.

Fear no more! I have fixed Galleria to work with jQuery 1.4.1. I used the underrated javascript debugger built in Visual Studio 2005 to locate the incompatibilities and resolve them. Those were:

  • @rel need to be changed to rel (no @)
  • The thumbnail preview was attempting to parse an image that didn't exist, so now a check is made to ensure a URL is present
  • There was an extra quotation mark on the same line

All in all, very simple changes. I think this goes without saying, but I'll say it anyway: I take no responsibility for any problems you may have with the jQuery I have attached. Any charity you wish to show for the plugin should be directed at the official developers for their hard work. I want none of it!

If you are lazy like me, and I suspect you are, you probably just skipped to the end of this article to find the download link. Well here you go:

FIXED jquery.galleria.zip (4.46 kb)



BatteryMonitor 1.0.2 FINAL RELEASE

clock December 6, 2009 20:40 by author Jordan

Sadly, this will be the last effort I put into battery monitor. My interest in homebrew development waned as soon as the official app catalog opened. Also sad is the list of changed features is shockingly sparse.

 

  • Removed capacity since it was unreliable and caused more headache than it was worth
  • Removed front page, moved options into the application menu
  • The detailed status can also be accessed through the application menu
  • The runtime should now report days, and also won't report data that is 0
Note, changing the polling time on the fly takes effect AFTER the last poll completed. So, if you had your interval set to 30 minutes and you change your mind to put it to 5 seconds, you won't see any updated info until the 30 minute poll is honoured. Changing the polling time on the fly may also skew the graphing data.

Although this closes the chapter on my freshman efforts with webOS, it is not my swan song to webOS. There will be new applications, but they will not be spoofing the Palm vendor id, so they can go to the official app catalog.

Thanks to everyone for your continued support and suggestions, and I'm sorry that I couldn't implement most of them.


The latest version will also be available at precentral.net

com.palm.futurepr0n.batterymonitor_1.0.2_all.ipk (25.22 kb)

 

Edit: Found a bug and was forced to release a new version!

 

If you still like my app (please do!) and want to show support, feel free to donate.

 

 



Is your Pre stuck in headset mode?

clock November 8, 2009 20:44 by author Jordan

This post is to help anyone who might google not having any audio play through their headset speaker on the Pre.

 

So there I was, listening to some streaming radio with headphones on the commuter train home when I get a call. I realize that you can answer the call fine and talk through your headphones but, through natural habit, I unplugged my headphones and tried to talk on the phone normally. All of a sudden, there was no sound! SHIT! My phone is barely a month old and already the speaker is broken.

 

There is a bit of confusion around this specific problem because there are really two problems with the same symptoms. These being:

  1. You hear no audio through music apps without headphones
  2. You hear no audio when accepting a call (except through the speaker phone)
  3. The proximity sensor doesn't work, or the screen doesn't turn off when you put the phone to your face during a call

 

Through my past experiences with my xbox breaking, I've grown more and more restless in dealing with warranties. So I decided to investigate the problem on the single most powerful resource for the Palm Pre, precentral.net. I immediately found that many people were experiencing this problem, and the accepted solution was either doing a soft reset (sym+orange+r) or by plugging in the headphones back in a couple times to get the phone back into normal mode. This, however, did not work for me. Growing frustrated, I tried pulling the battery, several resets, plugging in the headphone over and over with no luck. As a last ditch effort, I used webOSDoctor to erase my phone back to factory. Still nothing.

 

Fuck!

 

Well, this is where the useful information may come for you. As I said before, there seems to be two unique problems with the same symptoms. The first being a software issue, the second being hardware. Yes, believe it or not, there is a hardware problem. The good news is you can fix it completely by yourself!

 

Before doing what I suggest, please know that I accept NO responsibility for any damage you do to your device. I do not work for palm, nor do I represent them in anyway.

 

Continuing on, the problem has to do with the headphone jack becoming blocked with dirt - dust - or some sort of fragment. This tricks the phone into thinking that the headphones are always plugged in. Not good! To fix this, you need to simply follow these steps:

  1. Shut down the Pre, remove the battery
  2. Get a Q-tip and remove some of the cotton so that it will fit in the Pre headphone jack (see where I'm going with this?)
  3. Dip the Q-tip into rubbing alcohol and shake off any excess
  4. Clean out the inside of the headset jack thoroughly (if you don't see anything on the Q-tip, don't fret - neither did I)
  5. Use the other end of the q-tip to dry out the alcohol

 

Done! That's it! This is what worked for me and I'm hoping it will save you the trouble of dealing with warranties.

 



BatteryMonitor 1.0.1 wishlist

clock September 15, 2009 04:34 by author Jordan

I had originally intended on closing the books on BatteryMonitor, since it was my first app and was being used as a learning tool. I really wanted to start on an app to release when the official App Catalog opens up to make some extra cash. However, I received such a resoundingly positive feedback from the precentral members who were kind enough to make suggestions that I've been a little inspired to make one last tweaked version.

With that in mind, I'm compiling a wish-list of the most popular (and feasible) suggestions I saw on the forums. Please feel free to comment if there is something else you want to see.

  1. Run as a background application (This is a maybe... mostly because no one has REALLY done it successfully yet)
  2. Remove first setup screen and put options such as notifications, polling time and graphing in the application menu (top left drop menu)
  3. Add a polling time for one second
  4. Make the Drain Per Hour resemble the current drain more, take the data I currently create and move it into a new category called "Overall drain per hour"
  5. Graph and show the current signal strength and band (EV, 1x) at each polling interval
  6. Grab running apps (if possible, this is another maybe)
  7. Save each session to the depot, to be viewed on a separate scatter-plot graph on selection. This will have a short 4 or 5 letter label so the plots are identifiable
  8. Add a Donate button to the precentral entry page!!

Thanks everyone. I feel like a little bit of a dirtbag for saying this but if you find my app is useful, please think about donating even a small amount. I put a great deal of personal time to get this up and running and, even though I think getting the positive feedback and recognition is more then enough payment, recognition doesn't pay the bills.



BatteryMonitor 1.0.0

clock September 9, 2009 00:44 by author Jordan

Update:

Now available on fileCoaster as of September 10th. Thanks to everyone with their positive feedback and excellent suggestions on the precentral forums!

 

The Pre battery has never been a strong point. As a result, there has been a good deal of guess work on battery life based on configurations. Should I turn off my GPS, should I keep AIM offline, should I keep my cards open, or close them? There really isn't a good way to determine this right now. And what about new OS versions? Most people can only say it seems better.

What BatteryMonitor does is it tracks battery usage over time. Using this tracked information, it can guess how much battery you lose per hour, how much time you have left, as well as illustrate your battery usage in a graph.

The way I do this is by polling for the battery status at defined times, which you select when you first start the application. As a result, the information isn't very reliable until used for an extended amount of time - I'd say a minimum of one hour. Without this larger sample set, the chance that a one-off skewed data point could muck up the results. I suggest using smaller intervals - but you have to keep in mind that polling every 1 minute also has a small impact on battery. With larger intervals, such as 10 minutes or more, you may need much more data before the numbers normalize.

Graphing is implemented via the google chart API. This means that a data connection is required to download the chart after each update. It is normal for the line to look mostly flat at the beginning, again give it some time before judging results.

The notifications option will send a notification with the current battery level, the drain-per-hour rating and the calculated remaining life after each poll. I suggest not using this if you set your polling time anywhere less than 30 minutes because it will become very intrusive. In fact, I'd probably suggest not using it at all.

The application needs to be running at all times to track the data but can be running in the background. So you are encouraged to do day-to-day use while it is running and see how much battery life your current configuration is using.

Feedback is welcome but I don't plan on modifying this application much. Being my first app, it was more of a learning project than anything else. As a result, I want to focus my efforts on more ambitious endeavors.

The code is free to be reused by anyone should they want to, given that it is NOT for commercial use.

Screen shots:

 

Version 1.0.0 - Initial Release: 

com.palm.futurepr0n.batterymonitor_1.0.0_all.ipk (24.34 kb)



The irony of webOS development

clock September 9, 2009 00:20 by author Jordan

So I'm just about finished my first webOS application, and reflecting back on the past couple days, I noticed that:

  1. I am not creative, and although I insist on making a "million dollar" app, I don't have the imagination to think it up
  2. I really appreciate having access to the webOS code via the webOS Doctor jar, as it proved extremely helpful when looking for examples
  3. The API on developer.palm.com is very disappointing (lack of information)
  4. The framework is seriously tied down by silly restrictions

 

To go into #4 in more detail, I'll have to explain my application. One of the foremost complaints of the Pre so far has been the dismal battery life. I won't try to sugar coat that fact, it's pretty bad. So I thought it would be a great application to write an application that tracked and calculated battery performance. This would be useful to track metrics on application configurations, or complete operating system version and see qualitatively if there are changes in battery life.

This should be easy, I thought. Especially with the help of this excellent crash course on webOS development. So being a full-time programmer, I decided to go to the programmer's main resource - the API documentation. This is where my first problem was. Although the API does a nice job of showing the possible web-controls (widgets) you can use, it doesn't give any really nitty-gritty information (i.e. how to get battery levels).

So after being immediately defeated, I decided to try and crack open the my VirtualBox emulator image to read the code that accomplishes this in the status bar. Failing to do that, I found success by extracting the webOSDoctor and searching for bar-assistant.js. This had all the code I needed! Great find, I thought. However there was one more problem...

I copied the code I saw in bar-assistant.js to get the battery info as close as I could without taking in the excess fat. When I launched, I expected it to fail, as programs usually do on their first run, but the error I was getting was claiming that the method I was calling didn't exist. Strange, I thought, I'm pretty sure I copied it correctly. Nevertheless, I tried again... and again... and again. Still, every time the functions did not exist.

By this point, I was pretty frustrated. I had spent hours writing and rewriting the same code trying to look for the smallest of typos. Then I read somewhere that palm locked out part of their functions based on vendor of the software. Bingo! So I changed my app.json information to be a com.palm and vendor=palm and... well whad'ya know - it works!

For those of you who don't find the irony in this yet, there was a little bit of a scuffle between apple and palm about syncing to itunes. The jist of it was that apple didn't want the pre to sync to their software, so they locked out any product without an apple vendor id from itunes. Palm's solution to this? Spoof Apple's vendor id! After doing this, palm took the initiative to complain to the USB forum about locking out devices based on vendor IDs in compliance with open standards... or something like that. However, to get the functionality I wanted, I had to spoof my application as a palm app!

It's funny how things work out.

 

Anyway, I'm currently waiting for developer access to post my app on precentral.net so keep an eye out and start managing your battery life better!



Sign in