gfbio
gfbio

Reputation: 1546

Android application doesn't close

I've written an application for Android, but it doesn't close and it also starts automatically with the system. I don't know why, but it can't be closed, even through the Task Manager. So I would like to know why it doesn't close.

Upvotes: 1

Views: 439

Answers (1)

dylan murphy
dylan murphy

Reputation: 1370

I'm sure you have read how Android apps aren't really supposed to close. That aside, I also needed my app to terminate when no longer visible. First I tried

System.exit();

That worked just fine but it isn't the proper way to do it, the best way is to call

finish();

I'm sorry if you had already tried/were aware of those solutions; it wasn't clear from your question.

Upvotes: 2

Related Questions