Questions tagged [application-restart]

Questions based on restarting programs in various programming languages belong in this tag.

Based on certain conditions, the entire application may need to be restarted. In these cases, it is likely that the code file in question is already being run as the main() of the application. Restarting an application at this level is not always trivial.

Since different languages may handle this differently, a question tagged with this tag must also be tagged with the programming language being used

236 questions
3
votes
2 answers

android:clearTaskOnLaunch doesn't work How to clear the backstack when comes to foreground?

I need this behavior in my app, "user must have to login in each time he tries to launch it(touching the app icon directly, or by task manager or via recent apps)" So the activities are in this order (think the App name is Foo app) S - Splash…
Randika Vishman
  • 7,983
  • 3
  • 57
  • 80
3
votes
3 answers

OnCreate instead of OnResume/OnRestart?

I have some Activities, let's say Activity A, B and C. In the Activity A I call the B through a Menu with an onOptionsItemSelected: Intent main = new Intent (this, MainActivity.class); this.startActivity(main); Now, when I'm in the B activity, I…
peppeuz
  • 231
  • 5
  • 13
3
votes
3 answers

How to start the application after boot complete in android version 3.1 and above?

I got to know boot complete intent is not supported by android version 3.1 and above from here. But in my application. I want to start services automatically in my application after device is rebooted. I do not want user to start my application…
thej
  • 648
  • 10
  • 33
3
votes
1 answer

Phonegap Android application restarting instead of resuming on coming back after home button click

I have created PhoneGap 1.4/ with Android application with plugins. My client reports that, when he leaves the app using the Home button, and then relaunches it using the app icon, the app relaunches from the start instead of resuming. However, when…
2
votes
2 answers

How can I prevent a re-start of my app when the phone is rotated?

In my app I don't want to restart a media player once it starts if the user rotates the phone. How can I prevent a re-start of my app when it is rotated because it stops the running sound file that is playing? Please show me the code I need to add…
Emad-ud-deen
  • 4,734
  • 21
  • 87
  • 152
2
votes
0 answers

Android App Restart - Not Working for Android 11

To Restart the App : done as below : fun restartApp(context: Context) { try { val mStartActivity = Intent(context, SplashActivity::class.java) val mPendingIntentId = 123456 val mPendingIntent: PendingIntent =…
Jaimin Modi
  • 1,530
  • 4
  • 20
  • 72
2
votes
1 answer

NodeJS Javascript: Restart Process

Thanks you for clicking on this question. I am trying to restart a nodeJS process, without external libraries. I did this code: function restartProcess() { spawn(process.argv[1], process.argv.slice(2), { detached: true, stdio: ['ignore', out,…
XXfedeXX
  • 81
  • 1
  • 8
2
votes
0 answers

ASP.NET 4.0 compilation and application restarts?

I thought I understood this but a production problem yesterday makes me question my understanding. We do not batch compilations, instead letting ASP.NET compile pages as they're accessed. This isn't normally a problem because we do deployments on…
n8wrl
  • 19,439
  • 4
  • 63
  • 103
2
votes
0 answers

Keep an app running and if it crashes, restart it. Ubuntu 16

I'm running an Ubuntu 16 server. Mainly I have an application running. I use Plesk, WinSCP and PuTTY to manage the server, the files, and to run this app. The app it's a .jar which I allocate RAM and run. This app has a console which I run into an…
KaizenS
  • 21
  • 1
2
votes
0 answers

Android startActivity vs HOME Button

I have a mainactivity. In the AndroidManifest I have declared. android:clearTaskOnLaunch="true" This should bring me to this activity, every time the app is ended with the HOME Button and call onRestart() then, right? Furthermore my mainactivity…
2
votes
1 answer

Visual Studio 2017 is stopped when do the restart application of nopcommerce 4.2

When I do the restart application of nopCommerce 4.2 from admin side it always stop visual studio and as well as application. So, from that plugin install and uninstall features is also not working. There is any solution for that than let me…
2
votes
1 answer

Restart the while loop after the error message in the output

Problem: How can I restart the following codeblock? My idea is if you enter a character that will return an error message. What is the condition for the loop? string r_operation; Console.Write("\tBitte geben Sie ihre Rechenoperation ein:…
2
votes
2 answers

K8s: StatefulSet how to increase time between resatrt of pod in case fails

I have integration test, where i start StatefulSet, wait untill ready and then do some asserts. My problem that if Application fails - it try to restart too fast. And I can't get logs from failed pod. SO my question how can i increase time between…
Grigoriev Nick
  • 1,099
  • 8
  • 24
2
votes
6 answers

QT4: How to restart application? Reset settings?

1.) I would like to restart my QT4 application. Just a normal shutdown and start of the same application. 2.) Why? Well i need an Option to "reset" everything. To restart the application seems to be the easiest way to do this. The problem is, that…
Revollt
  • 55
  • 3
  • 5
2
votes
3 answers

How to restart NodeJS with cPanel

I need to know what to use from root side of cPanel based server to restart NodeJS app, for example, if process terminated now for some reasons NodeJS app will not start until I manually start it, same if server restart I need manually to restart…
Nesooo
  • 23
  • 2
  • 5