phonegap deviceReady not called in android

I found several other folks via a google search that experience the same problem.  To summarize, the deviceReady function IS being called, it just is being called super-fast, before your handler is setup to respond to the event.

Here is how I fixed it for the spotmouth android app. I test for the presence of the navigator.device object.  If it's not there, I register my callback. If there is already present, than the deviceReady event has already been called, and I just call it myself.

Html:

<body onload="onBodyLoad()">

</body>

how to find out what version of websphere you are running

The information is output in the "SystemOut.log" file where the application server log files are.

 

WebSphere Platform 6.1 [ND 6.1.0.21 cf210844.13]  
Detailed IFix information: No IFixes applied to this build
Host Operating System is Linux, version 2.6.9-78.0.8.ELhugemem
Java version = 1.5.0, Java Compiler = j9jit23, Java VM name = IBM J9 VM

 

Best Java Memory Analysis Tool

Just wanted to give some good words to the SAP memory analyzer.  It's free, and definitely worked for me where a lot of other tools didn't

 

http://wiki.sdn.sap.com/wiki/display/Java/Java%20Memory%20Analysis

Disable SOP for GWT Learnings

What I have just learned is that I have been implementing all communication with my server using JSONPRequestBuilder in order to deal with SOP (Same Origin Policy) for no need. I could be just using RequestBuilder.

zero to full featured android app in just a few hours

Wow.  Phonegap is truly awesome.

For the past month+ (in weekends/evenings), I have been writing a GWT application that I have deployed as an iPhone application to PhoneGap.

Today, I started the process to "port" my application to android.  Just a few hours later, I am up and running my application in the emulator.  If I could have just known not to try generate the android application from the windows command line vs. cygwin, I could've been here in just an hour.

Application is looking good!  here is a screen shot.

phonegap and android

Following the installation guide to setup my first phonegap-based android project.  The most important thing I wish I had known is that the ruby script that you have to run (droidgap) will not run correctly in cygwin.  I tried (and tried), but once I switched to just a windows command console, it all worked fine.

If I commented out the "makejar" task in the droidgap script, it would work in cygwin.  I think, for whatever reason, invoking ant did from ruby did not work.  Of course I had ant, etc... all setup since that is my development environment.

clearcase checkout by label

They use clearcase in some places.  It took me a little longer to figure out how to get a version of the code that has been labeled.  Where here is a 3-liner that accomplished that for me.


element * CHECKEDOUT
element * YOUR_LABEL_HERE
load /YOUR_VOB_HERE

importing certificates in java

 

Here are a few points that I would like to remember (when I have to do this again).

 

  • Use IE (not firefox) and visit the secure site that you want to access from Java. 
  • Right click on the page and choose "Properties"
  • Click on "Certificates"
  • Choose Details
  • Choose "Copy To File"
  • Hit "Next"
  • Choose the default format "DER encoded binary X.509 (.CER)"
  • Save your file (ie c:/certs/myhost.cer)

Now open a command console window

Green Apple Barter is the biggest waste of money

This is about Green Apple Barter

I usually don't post these types of things, but I just had to say something at this time.  Just closed my account.  At the end of this relationship, I will have spent around 2000 dollars of my cash and several hundred dollars in trade in exchange for one visit by an overpriced plumber.  It was something like $600 to upplug a sink, and not even an emergency!

So here's the Math:

you gotta do encodeAsURL for anything in the URL

In testing spotmouth, came across some spots that had ampersands in the names.  I put the names in the URL (heard it's good for seo), but when I did a request for the spot with the ampersand in it, I got a 404.

I needed to call the "encodeAsUrl()" on the values that could contain these types of characters.  here's an example of what I am doing:

 

Syndicate content