Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

gwt mobile and windows phone basic code doesn't work

536 views
Skip to first unread message

jayashree

unread,
Jun 6, 2012, 6:16:44 AM6/6/12
to gwtm...@googlegroups.com
gwt mobile 1.1 and cordova -1.7.0 

our app works fine on android. We are trying to port to Windows phone . We wrote a simple gwt app without any phonegap code and that works on the windows phone emulator. Now we changed the code to use phonegap - Event.onDeviceReady() and nothing shows up. Here is the code 

public void onModuleLoad() {
Event.onDeviceReady(new Callback() {
@Override
public void onEventFired() {
final Button sendButton = new Button("Send");
final TextBox nameField = new TextBox();
nameField.setText("GWT User");
RootPanel.get().clear();
HorizontalPanel hp = new HorizontalPanel();
hp.add(nameField);
hp.add(sendButton);
RootPanel.get().add(hp);
}
});
}
 
Any help appreciated. 

jayashree

unread,
Jun 6, 2012, 6:32:44 AM6/6/12
to gwtm...@googlegroups.com

    <script type="text/javascript" language="javascript" src="cordova-1.7.0.js"></script>
        <script type="text/javascript" language="javascript" src="wptest/wptest.nocache.js"></script>
Are present in the code yet the error displayed is
Error calling js to fire nativeReady event. Did you include cordova-x.x.x.js in your html script tag?

Dennis Z Jiang

unread,
Jun 6, 2012, 9:25:10 PM6/6/12
to GWT Mobile
Hi, gwtmobile has not been tested on windows phone, so I am not
exactly sure how well it works on that platform. That said, you want
to make sure that you copy the phonegap javascript file to the war
folder, and load the js file with a script tag in your html. gwtmobile
does not proload the js. Note, phonegap uses a different javascript
file for each platform. So make sure you copy the right js file for
your platform.
Reply all
Reply to author
Forward
0 new messages