Tecnologia do Blogger.
RSS

[androidbrasil-dev] Chmar nova Activity usando AsyncTask

Olá amigos, 

Estou fazendo uma solicitação GET usando AsyncTask, porem ao terminar a comunicação preciso chamar outra Activity mais não estou conseguindo!

Segue o codigo:


AsyncTask<Void, Void, String> json = new AsyncTask<Void, Void, String>() {
@Override
protected String doInBackground(Void... params) {

                            Http req = new Http();
                            try {
                                String url = "http://www.movidev.com.br/appEscola/webservice/script_pai.php?pai_id=1";
                                //String login = editLogin.getText().toString();
                                //String senha = editSenha.getText().toString();
                                String get = req.doGet(url);

                                return get;

                            } catch (IOException e) {
                                e.printStackTrace();
                            }

                            return null;
                        }

                        /*


                         */
                        @Override
                        protected void onPostExecute(Void s) {

                            //lbTeste.setText(s);
                            Intent chamada = new Intent(this, FilhosActivity.class);

                            startActivity(chamada);

                        }



                    };


                    json.execute(new Void[0]);

Obrigado a todos!

--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário