Make sure that only one instance of the application is running on the system.
Questions tagged [single-instance]
250 questions
0
votes
0 answers
after minimize the app from singleInstance launchMode activity, all previous activities in backStack destroyed
I am running into issue where onDestroy() invoked for all previous activities when singleInstance activity is running and i minimize my app.
i create a sample App to check this behavior:
my Manifest

Hofit.Shalom
- 36
- 6
0
votes
1 answer
single instance of cron - kill old execution before starting new one
The requirement is to run a cron on an hourly/daily basis.
But sometimes, the cron takes too long to complete before the subsequent execution.
So, when the subsequent execution starts, it shouldn't run 2 parallel jobs.
Instead, it is supposed to…

Pankaj Singhal
- 15,283
- 9
- 47
- 86
0
votes
1 answer
Single Instance Activity does not receive Input events
I have 2 single instance activities in my app one is Log in Activity(A) which is also startup screen and other is kind of application home Activity(B). If I am on B and press home key on phone and go to home screen on phone then after a while if I…

user951910
- 15
- 2
- 5
0
votes
0 answers
Calling startService from singleInstance activity throws IllegalStateException app is in background exception
I'm getting the following error while calling startService from an activity.
Caused by java.lang.IllegalStateException
Not allowed to start service Intent { act=com.myapp.action.STOP_SERVICE cmp=com.myapp/.services.CallService (has extras) }: app is…

Sujith S Manjavana
- 1,417
- 6
- 33
- 60
0
votes
0 answers
Best Way to implement Single Java Application Instance
From what I have searched so far, I find 2 solutions.
One is to create or reuse a file, then try to lock the file.
File file = new File(lockFile);
RandomAccessFile randomAccessFile = new RandomAccessFile(file, "rw");
FileLock fileLock =…

CHANist
- 1,302
- 11
- 36
0
votes
1 answer
Make an single instance app and showing the MainWindow when another instance is launched in VB.NET with WPF
I am looking for a way to make my app running in a single instance mode and showing the MainWindow of the first instance when another instance is launched.
I do a quick search on the internet but I did'nt find anything to open the MainWindow of the…

Bahaïka
- 699
- 1
- 11
- 36
0
votes
1 answer
Show hidden application on trying to launch a new instance of a single instance application
I'm working on a single instance application in VB.NET that goes hidden when we minimize the form:
Private Sub Form_Resize(sender As Object, e As EventArgs) Handles Me.Resize
If Me.WindowState = FormWindowState.Minimized Then
Me.Visible…

Pspl
- 1,398
- 12
- 23
0
votes
2 answers
Single instance not working in C#, program can't access itself
I am trying to get a program to open a file in the current instance rather than a new instance, and here is what I have so far, which I got from this question.
static class Program
{
static EsfEditorSingleton controller;
…

Arlen Beiler
- 15,336
- 34
- 92
- 135
0
votes
1 answer
SingleInstance() not working only on cluster
I am building a solution that implements a RESTful service for interacting with metadata related to federated identity.
I have a class that is registered with Autofac like this:
builder.RegisterType()
…
0
votes
4 answers
How to display a single instance of a Winform throughout the whole program?
Accept my apology if my question and the description seems too simple or already been asked by others.
I may have asked a similar question before. However, I am still confused a little about winform. Say you have a Delphi prism .net program with…

ThN
- 3,235
- 3
- 57
- 115
0
votes
1 answer
how to start multiple files in windows in one process?
I have a java audio player with a exe launcher which I made with launch4j and created a installer with inno setup. In windows when I select multiple files and open them, each file opens in different process, but what I want is all the files to open…

Devesh Agarwal
- 19
- 4
0
votes
0 answers
It's there a way to open the same instance of a WPF app everytime?
Here's my problem. I've made a simple stopwatch using WPF with start stop pause functions. Now what I want to do is that no matter how many times someone opens the .exe they will always see the same stopwatch.
I've used Mutex to check if the app is…

AkisRep
- 9
- 2
0
votes
0 answers
Make changes from one instance of application in other instance
➤ What I want:
I have a window & a label in that window, when app is ran for the first time, label shows default text, but if user tries to launch second space, second space doesn't launch, instead it changes the label in the first instance which…

Ecto Ruseff
- 141
- 1
- 9
0
votes
1 answer
Object throwing multiple instances even though it's configured for a single instance
I am coding in Python and I am facing a situation where my object is throwing out multiple instances even though it has been configured for a single instance. So I have multiple modules that is running a script and there is one module called…

Ridwan Chowdhury
- 25
- 1
- 7
0
votes
1 answer
Converting a function into a singleton class that returns one instance
I am doing this project on Python 2.7 and I am trying to convert this function that returns a logging object. I am trying to make sure that I can utilize the same object instance through different python modules by importing it without actually…

Ridwan Chowdhury
- 25
- 1
- 7