GetSelectedText en inactive InputConnection / setComposingText en inactive InputConnection / getExtractedText en inactivo InputConnection

Este es mi código para conectar la aplicación de Android a la base de datos externa contenida en un servidor de PC! Mi aplicación funciona muy bien en el emulador de eclipse, pero cuando uso la aplicación en mi samsung galaxia s2 no funciona! Cuando intento escribir en EditText logCat dijo:

05-08 21:54:25.800: W/IInputConnectionWrapper(876): getSelectedText on inactive InputConnection 05-08 21:54:25.805: W/IInputConnectionWrapper(876): setComposingText on inactive InputConnection 05-08 21:54:25.805: W/IInputConnectionWrapper(876): getExtractedText on inactive InputConnection

Public class MainActivity extends Actividad {

  EditText username1; EditText password1; TextView status; ResultSet rs; //private static final String url = "jdbc:mysql://10.0.2.2:3306/tesina"; private static final String url = "jdbc:mysql://192.168.1.10:3306/tesina"; private static final String user = "root"; private static final String pass = ""; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); username1 = (EditText) findViewById(R.id.user); password1 = (EditText) findViewById(R.id.pass); //status =(TextView) findViewById(R.id.login_error); Button btnLogin=(Button) findViewById(R.id.btnlogin); btnLogin.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { new Connessione().execute(); } }); } private class Connessione extends AsyncTask<String, String, Void> { @Override protected Void doInBackground(String... String) { String us = username1.getText().toString(); try { Class.forName("com.mysql.jdbc.Driver"); Connection con = DriverManager.getConnection(url, user, pass); Statement stmt = con.createStatement(); rs = (ResultSet) stmt.executeQuery("SELECT * FROM prova WHERE nome='"+us+"'"); } catch(Exception e) { e.printStackTrace(); } return null; } protected void onProgressUpdate(String... values) { } protected void onPostExecute(String result) { String p = password1.getText().toString(); try { if(rs.next()) { String dbpass = rs.getString(2); if(dbpass.equals(p)) { Intent i = new Intent(MainActivity.this,classi.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); finish(); } else { Toast.makeText(getBaseContext(), "errore: password non inserita correttamente", Toast.LENGTH_LONG).show(); } } else { Toast.makeText(getBaseContext(), "errore:username non trovato", Toast.LENGTH_LONG).show(); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); Toast.makeText(getBaseContext(), "applicazione non collegata al database della scuola", Toast.LENGTH_LONG).show(); } } } 

}

FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.