Questions tagged [activity-finish]
341 questions
-2
votes
2 answers
Program exits before executing rest of the program
I am trying to create a students program but it stops after I put the 4th name, it doesn't allow me to put the grades neither shows the list at the end...
#include
using namespace std;
int main()
{
string name[4];
double…

Felipe_Rodrigues
- 3
- 1
-2
votes
1 answer
Activity.finish not work in some devices?
I have faced a weird problem in finishing activity.
I have two activity in my app . The first one is my main activity and will open the second activity . The second activity is a simple activity with two buttons.
The first button is cancel button…

Mojtaba Pirveisi
- 11
- 2
-2
votes
2 answers
MyApplication.java did not run at the second time app started?
I have 1 application custom class MyApplication.java and 1 activity MainActivity.java.
At the first time when I start app, class MyApplication.java run correctly. Then I exit app by finish the activity
MainActivity.this.finish();
Then I click the…

Qk Lahpita
- 427
- 2
- 10
- 18
-2
votes
4 answers
A close button that finishes all activities
I have 5 activities in my android app,on last activity i want a close button that exits the app by finishing every activity one by one?

Sami Ul Haq
- 9
- 5
-2
votes
1 answer
finish() won't take back from Activity2 to Activity1
I have an app built of two Activities.
the main activity (activity 1), using some button, takes you to activity 2 using a startActivityforResult.
Activity 2 is a file chooser that chooses some file by clicking on it.
once the file is chosen, I want…

Julius
- 41
- 5
-2
votes
1 answer
How to remove my app from - history apps (that was launched)
how can I remove my app from the history app
(history - by long press the home button)
I look and done some things I saw, but it doesnt work, and I still see my app in the history.
I call to finish()
onDestroy(){
super.onDestroy();
…

ofir_aghai
- 3,017
- 1
- 37
- 43
-2
votes
2 answers
finish() takes me to main activity
i have a simple videoplayer with 3 activites. on my last activity i have
player.setOnKeyListener(new View.OnKeyListener() {
@Override
public boolean onKey(View v, int keyCode, KeyEvent event) {
if (event.getAction() !=…

user2651206
- 1
- 1
-2
votes
2 answers
Android app, finish() doesn't work
The finish() method sends me back to the main activity, rather than terminating the app. Any suggestions?

Pasha Shklovsky
- 7
- 1
-3
votes
1 answer
Why doesn't the finish() method work on my android studio project? 1
I'm trying to create a Splash screen and that was successful. However, I want the splash screen to disappear after 3 seconds. In an attempt to achieve this, I used the finish() method which didn't work to any avail. I'm wondering why the finish()…
-3
votes
4 answers
How to exit the application completely from any screen
I want to exit the android application completely from any screen i also tried System.exit(0); and finish(); but it only exit the current activity i want to exit completely. I used menu option for exit can any one help me in coding.

Jagan
- 692
- 1
- 12
- 38
-4
votes
6 answers
How to close all activity
Login_page>>home_page>>search_account>>delete_account
Then I delete an account and I want go to login_page. I mean what is actual code for close all activity without login_page?
This is my code, but is not work.
AlertDialog.Builder builder = new…

Atik Faysal
- 158
- 1
- 13