presionando el botón Atrás en una actividad que muestra una URL

I have a problem. In my app I have a slideshow with images. When a certain image is clicked a url is open uring this code :

Intent browserIntent = new Intent(Intent.ACTION_VIEW,
                            Uri.parse(target[idImage]));
startActivity(browserIntent);

The problem is that when back button is pressed the app get shutdown. What should I do? I mention that on the class with slideshow I override the method for back button pressed for going to the previous class.

Aquí está mi código:

@Override
    protected void onPause() {
        super.onPause();
        System.out.println("onPause!!!!!!");
        t.cancel();
    }

    @Override
    protected void onResume() {
        super.onResume();
        System.out.println("onResume!!!!!!");
        vf.startFlipping();
    }

where t is the Timer and vf is the ViewFlipper

preguntado el 08 de noviembre de 11 a las 15:11

Can you post the onResume and also onPause methods from your Activity? -

when you get back from the browser intent, does the onPause method get called? -

no,onPause() method is called when the browser intent is opening. For back from browser intent I get moveTaskToBack and i don't understand why this. -

I think I'll need to see the entire Activity, because the only reason I could think now is that you are finishing the activity somewhere when you call to the browser intent. -

Here is my activity : pastebin.com/xrrLgLqd -

0 Respuestas

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.