Saturday, April 19, 2014

Localhost for Android Emulator??

Hello everyone,

i need really help with one problem. Im developing an application with Android with the help of mgwt, gwt-phonegap, phonegap and GWT of course. Now i already have GWT Web application running.

Now i already developed everything with mgwt and i can see my login page on the emulator. What i cant do and is making me crazy is going through the Login and i dont know why.

I already followed the steps posted from this blog http://blog.daniel-kurka.de/2012/04/gwt-rpc-with-phonegap-revisited.html

Here is my code:

private void checkLogin(String userName, String password)
   
{
       
if (userName.equals("") || password.equals(""))
       
{
           
return;
       
}
       
Log.info("Login in with User " + userField.getText());
//        Log.debug("Password: \'" + passField.getText()+ "\'");
       
LoginServiceAsync loginservice = (LoginServiceAsync) GWT.create(LoginService.class);
       
PhonegapUtil.prepareService((ServiceDefTarget) loginservice, "http://10.0.2.2:8888/projectname/", "Login");

       
XXAsyncCallback<User> callback = new XXAsyncCallback<User>()
       
{
       
           
public void onSuccess(User result)
           
{
                handleUser
(result);
           
}
       
       
};
       
Log.debug("Send Logindata to Server");
        loginservice
.checkLogin(userName, password, callback);

   
}



Im just deploying this in localhost. Connection to the database is on an external server but i have a network connection which i can establish to connect to the database. Anyway.....i cant seem to open a database connection within the Android emulator.

I have been searching the internet for a solution but i didnt find anything. What am i doing wrong?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment