Questions tagged [single-instance]

Make sure that only one instance of the application is running on the system.

250 questions
3
votes
0 answers

Cross-platform single instance application in Node

I have a Node script and I need it to be executed as a single instance application. What I need is something in the form // myscript.js if(somelibmaybe.already_running()) process.exit(); else // Do things Is there any way at all to do this in a…
Matteo Monti
  • 8,362
  • 19
  • 68
  • 114
3
votes
4 answers

Keep singleton instance of java application

I have a jar file that displays a JFrame when it is executed. I don't want to allow duplicate execution of my Jar file. Every time before creating the frame, using Java I want check whether the Jar is already executing. If my app. already has an…
Karthikeyan
  • 406
  • 3
  • 14
3
votes
1 answer

How to clear the stack on a SingleTop SingleInstance MainActivity on Android?

I am trying to clear every single activity on the stack by startActivity method with the Intent flags: (Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NO_HISTORY) (I have an exit button that resets and finishes all…
3
votes
1 answer

Examples of when to use launchMode = "singleInstance"

I am looking for concrete examples of when to use launchMode="singleInstance". Everywhere I read, it is said that there are very few occasions when it should be used. So I'm amazed I never see examples!! The closest explanation I've found is here…
Jodes
  • 14,118
  • 26
  • 97
  • 156
3
votes
3 answers

Easiest way to find previous instance of an application

I have rewritten a VB6 application in Delphi. It should have only one instance running. How can I do this with minimum of code? In VB6 we just have to use one single line of code > If App.PrevInstance Then 'Take some action End If On…
Yogi Yang 007
  • 5,147
  • 10
  • 56
  • 77
3
votes
1 answer

Single instance of Joomla!, subdirectories and multiple domains

We recently moved a number of static websites from multiple (regional) domains onto a single .com domain which uses Joomla! to serve up content. The new site uses subdirectories and allows uses to navigate between countries. Like…
RJB
  • 669
  • 1
  • 8
  • 13
3
votes
1 answer

Root android activity of a task

In my Android application I'm trying to make sure that certain activity should be always placed at the root of backstack when navigating to it. For example user starts A->B->C->D activities. Imaging that A - splash screen (with NoHistory = true), B…
Mando
  • 11,414
  • 17
  • 86
  • 167
3
votes
2 answers

WPF, how to make a single instance and shows the MainWindow when another instance is launched in c#

As the title state, I want to make a single instance program and show MainWindow when another instance is launched. I have acheived showing message that only one instance is allowed. public class MyApplication { static Mutex mutex = new Mutex(true,…
Alston
  • 119
  • 2
  • 7
3
votes
2 answers

Integrating Facebook and LinkedIn in Android app

I have an app that integrates both Facebook and LinkdedIn networks. According to the instructions, in order to integrate LinkedIn, I need to add the following code in my manifest, within my activity:
Dimitris
  • 419
  • 4
  • 19
3
votes
1 answer

How to find my JavaFX application in process manager?

I have a JavaFX application that should check if it has already been launched when you launch it (need only single instance running at the time). The problem is how to define it! I have tried packing my JavaFX application into .exe file (or make an…
Chechulin
  • 2,426
  • 7
  • 28
  • 35
3
votes
4 answers

single instance and notify in system tray

I am working on the application (C# 2.0). I have implemented single instance in it. Everything is fine. If i run the application again, it shows messagebox saying "instance is already running". Actually i don't want to show the message through…
emeh
  • 823
  • 1
  • 7
  • 21
2
votes
3 answers

Allow only one instance of JInternalFrame

I've created a Swing application with several JInternalFrames which gets added to a JDesktopPane on the event of a mouse click. I want only one instance of the same Internal frame to be present on the DesktopPane. I dont want the same frame to…
wishman
  • 774
  • 4
  • 14
  • 31
2
votes
1 answer

I need to use "singleInstance" in main activity, and also i need bring another activity to the top

I need only one instance of my app, so I use android:launchMode="singleInstance" in main activity section in manifest, but this causes: when I click on home button when second activity is displayed and launch my app again, main activity is…
Palejandro
  • 2,092
  • 5
  • 26
  • 38
2
votes
2 answers

Checking single instance of NSIS installer

I have an Updater program written in NSIS. I just wanna make sure that when it's invoked twice or more, it won't create another instance of the updater, else there would be two or more updaters running. How do you restrict the updater from creating…
Owen
  • 4,063
  • 17
  • 58
  • 78
2
votes
1 answer

Restrict user to a single window

In a project I'm working on (ASP .Net 3.5 web forms), there is a requirement to restrict the user to work in only 1 window/tab at time. I found this post detailing a solution: http://www.codeproject.com/KB/aspnet/MultipleTabWindows.aspx However, in…