Phonegap / PlayN to allow use of accelerometer
===

I've just recently got my PlayN tools all setup and am working on my first project.

I'd like to add support for accelerometer. I found the GWTPhoneGap project has this implemented for webapps, which is fine for me at the moment.

I attempted to instantiate PhoneGap in my PlayN Html class. 

    import playn.core.PlayN;
    import playn.html.HtmlGame;
    import playn.html.HtmlPlatform;
    import com.google.gwt.core.client.GWT;
    import com.googlecode.gwtphonegap.client.PhoneGap;
    import com.googlecode.gwtphonegap.client.PhoneGapAvailableEvent;
    import com.googlecode.gwtphonegap.client.PhoneGapAvailableHandler;
    import com.googlecode.gwtphonegap.client.PhoneGapTimeoutEvent;
    import com.googlecode.gwtphonegap.client.PhoneGapTimeoutHandler;
    import com.voidflux.absolutezero.core.AbsoluteZero;
    
    public class AbsoluteZeroHtml extends HtmlGame {
    
    	@Override
    	public void start() {
    		HtmlPlatform platform = HtmlPlatform.register();
    		platform.assets().setPathPrefix("absolutezero/");
    
    		PhoneGap phoneGap = GWT.create(PhoneGap.class);
    
    		phoneGap.addHandler(new PhoneGapAvailableHandler() {
    
    			@Override
    			public void onPhoneGapAvailable(PhoneGapAvailableEvent event) {
    				// start your app - phonegap is ready
    				PlayN.run(new AbsoluteZero());
        
    			}
    		});
    
    		phoneGap.addHandler(new PhoneGapTimeoutHandler() {
    
    			@Override
    			public void onPhoneGapTimeout(PhoneGapTimeoutEvent event) {
				// can not start phonegap - something is for with your setup
				PlayN.run(new AbsoluteZero());
			}
		});

		phoneGap.initializePhoneGap();
	}
    }

This feels backwards.. 
Should I be adding code to this file? Is there a better place to fire up PhoneGap? Once I setup the accelerometer code, I don't see how to get my callbacks to the Core code. I suspect because I am in the wrong area. I attempted to put the GWTPhoneGap code into the Core project, but of course there is no GWT class there to GWT.create(PhoneGap.Class).

Any suggestions would be really awesome.

Thanks in advance,
Scott
