Make sure that only one instance of the application is running on the system.
Questions tagged [single-instance]
250 questions
5
votes
4 answers
How to create a single instance of shared preferences which can be used in full project in flutter
Whenever we have to use shared preferences we have to create an instance of it.
In flutter creating an instance of shared preference is asynchronous;
final prefs = await SharedPreferences.getInstance();
we have to create its instance always whenever…

Priyanshu Paliwal
- 601
- 6
- 19
5
votes
3 answers
Run the current application as Single Instance and show the previous instance
I just implemented this code that is guarding the Single Instance of the Application, in order to not run the application twice.
Now I am wondering how I can show the original Application process that is already running.
Here is my code in the…

Salihan Pamuk
- 175
- 1
- 2
- 13
5
votes
3 answers
VB6: Single-instance application across all user sessions
I have an application that needs to be a single-instance app across all user sessions on a Windows PC. My research thus far has centered around using a mutex to accomplish this, but I am having an issue that I am not sure is really an issue, this…

A. Wilson
- 688
- 1
- 6
- 15
5
votes
3 answers
Creating single instance for system tray in java
I am working in a desktop application created in java. we are working for windows version (for running on windows O.S.) of the application. When we run our application, it creates a tray icon on desktop by using systemtray as
SystemTray tray =…

Toman
- 1,156
- 1
- 12
- 29
5
votes
3 answers
open program once with multiple files as arguments from explorer
I have a program that works when, a file is opened with it using the right click menu in explorer. But if I select multiple files and then right click and open with my program then it opens multiple instances of my program, instead of just passing…

Jonathan.
- 53,997
- 54
- 186
- 290
5
votes
0 answers
Android’s overridePendingTransition and singleInstance
I am stuck on an issue with overridePendingTransition not working after changing an activity’s launchMode to ‘singleInstance’. I’d love to hear your inputs on it
I am working on an app to navigate through a deck of cards. To keep things simple,…

infinity
- 1,900
- 4
- 29
- 48
5
votes
3 answers
Single instance WPF application using Caliburn.Micro
I've seen all the other questions regarding creating a single instance app using WPF and I've chosen to use the Microsoft's approach as described here: https://codereview.stackexchange.com/a/25667
This is working fine, but now I'd like to using…

Adabada
- 303
- 3
- 15
5
votes
1 answer
How to Programmatically Restart a Single Instance application
My WPF program uses SingleInstance.cs to make sure that only one instance of it is running if a user tries to restart it by double clicking a short cut to it or some other mechanism. However, there is a circumstance in my program where it needs to…

Tony Vitabile
- 8,298
- 15
- 67
- 123
4
votes
2 answers
CantStartSingleInstanceException when trying to start second instance
I'm trying to build a single instance application using the approach outlined here.
The reason I tried going with that solution is that I need to pass on the commandlines from the second attempt to start the app to the first instance, and this…

takrl
- 6,356
- 3
- 60
- 69
4
votes
1 answer
How to ensure single instance application (on multiple virtual desktops)?
I'm writing a C# WinForms application that I need to ensure there's a single instance running at any given time. I thought I had it working using a Mutex.
Here is a link that I found :
How to restrict the application to just one instance.
This…

luckman777
- 265
- 3
- 14
4
votes
1 answer
Saas: Single-instance vs Multi-instance vs Single-tenant vs Multi-tenant?
I've been reading about instances and tenants and in the Saas architecture. My questions are as follows (please correct anything that you notice I've gotten wrong with any of the following terms):
1) Instance: Is an instance of a piece of software…

gkeenley
- 6,088
- 8
- 54
- 129
4
votes
4 answers
Is it bad to use Singletons for immutable no-argument classes?
I am working on a small Java Project right now, and while doing so there where multiple classes created which represent some kind of Constant behaviour for example use as default return value for other methods.
Now what all these have in common is,…

SebasH
- 421
- 1
- 3
- 9
4
votes
3 answers
Notify a separate JVM to preform a task
So I am making a program that will only run one instance at a time and am doing so by using this solution
However now I would like to make it so that if the user trys to launch another instance it will consume that attempt and notify the current…

Austin
- 726
- 4
- 22
4
votes
1 answer
Android Usb Host, singleInstance, onCreate keeps getting called with USB attach
I have an application that uses a proprietary USB device (android in host mode).
I have a BroadcastReceiver which I register in the constructor
// this block is in the constructor
usbConnectionReceiver = new UsbConnectionReceiver();
IntentFilter…

jo phul
- 639
- 1
- 9
- 29
4
votes
1 answer
Configure SSL certificate by ACM on single instance tomcat on AWS
I have created a single instance web application on AWS with Elastic Beanstalk. Now I want to add ssl certificate to enable https access on it.
I created a ssl certificate using ACM and I was folowing this! link to add it to my web app in Elastic…

Dev Batwada
- 49
- 4