Bakke Andres Bakke Andres - 1 year ago 80
Android Question

How to destroy an android activity after when I sending a post with a web service?

I'm trying to submit a form using a web service done with GlassFish in Java and save the data in a PostgreSQL database. I am using AsyncTask to send data. The problem I have is that when I've finish sending the data I want to destroy the activity and return to the main page.

Answer Source

if you are in a sub-method, listeners, etc.:


if you are directly on your activity class just call

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download