Display background running on the UI threads

Hello

Sometimes I get the situation, that an action of the user needs time to perform. So I put this work to a task or Service.

I want to inform the user, that its action is still ongoing. Just a simple ProgressIndicator.

I know how to do it with a single task, but theoretically, there could be multiple tasks running, even some who were not triggered by the action of the user.

So I want a similar thing as in Eclipse or IntelliJ: a 'background' control, which displays all running threads.

Y at - it an easy way to do it, I mean from the perspective of Service/task/Thread, not the user interface.

Do I need to record each scheduled thread that I start control, for example, when it is scheduled?

Should I derive from task to make this logic?

Is there a way to "look" all discussions?

What is the best approach?

My idea was to add each task to the control. And control of listening to the property running. When it is finished, it is removed from the list of observable controls.

But what of the simple Threads, which can be started somewhere outside the Thread of the JavaFX Application?

For the more general part of the question (of Threads that can be lit outside the Thread of the JavaFX Application):

I've never worked with this part of the Thread API, but the Threads belong to the ThreadGroups. You can retrieve the group that belongs to a Thread with Thread.getThreadGroup (). ThreadGroups are hierarchical; each ThreadGroup except the top-level ThreadGroup has a ThreadGroup parent (ThreadGroup.getParent ()) and you can get references to all children with ThreadGroup.enumerate (ThreadGroup []) ThreadGroups. Wire also has a getState() method that returns an instance of the enum Thread.State.

Of course, none of this is observable in the sense of JavaFX properties, so you should probably periodically this survey instead of being able to listen passively to state changes.

For the easier part, a few ideas:

I did something that is conceptually similar to what you're trying to do. I have a client-server application in which the data model communicates with a remote EJB service layer. All calls to the service layer are threaded. The model exposes an IntegerProperty represents the number of tasks that are pending (i.e. waiting to be executed or running). Most of the calls to the model to result in the creation of a task which the call() method runs on the remote service. The relevant parts of the model look like this:

public class Model {
  private final ExecutorService executorService ;
  private final IntegerProperty pendingTasks ;
  // ...
  public Model() throws NamingException {
    // ...
  executorService = Executors.newSingleThreadExecutor() ;
  pendingTasks = new SimpleIntegerProperty(0);
}

  private void addListenersToTask(final Task task) {
  task.stateProperty().addListener(new ChangeListener() {
  @Override
  public void changed(ObservableValue observable,
  State oldValue, State newValue) {
  State state = observable.getValue();
  if (state == State.SUCCEEDED) {
  decrementPendingTasks();
  task.stateProperty().removeListener(this);
  } else if (state == State.FAILED) {
task.stateProperty().removeListener(this);
  try {
  context.close();
  } catch (NamingException exc) {
  System.out.println("Warning: could not close context");
  }
  status.set(ConnectionStatus.DISCONNECTED);
  }
  }
  });
  }

  private void scheduleTask(Task task) {
  addListenersToTask(task);
  incrementPendingTasks();
  executorService.submit(task);
  }

  private void decrementPendingTasks() {
  if (! Platform.isFxApplicationThread()) {
  throw new IllegalStateException("Must be on FX Application thread");
  }
  if (pendingTasks.get()<=0) {
  throw new IllegalStateException("Trying to decrement non-positive number of pending tasks");
  }
  pendingTasks.set(pendingTasks.get()-1);
  }

  private void incrementPendingTasks() {
  if (! Platform.isFxApplicationThread()) {
  throw new IllegalStateException("Must be on FX Application thread");
  }
  pendingTasks.set(pendingTasks.get()+1);
  }

  public int getNumberOfPendingTasks() {
  return pendingTasks.get() ;
  }

  public ReadOnlyIntegerProperty numberOfPendingTasksProperty() {
  return pendingTasks ;
  }

  // ...
}

All jobs are scheduled to run by calling the scheduleTask (...) method above, which increments the property pendingTasks, and adds a listener to decrement it when it is finished. The only way for tasks to fail in this application is whether the remote service goes down (the other exceptions are thrown by tasks), this is why I close the naming failure context, and there is currently no functionality to cancel tasks. The code will have to change to meet the cancellation or failure, if this isn't the case.

Of course, you could do more than a simple counter here using similar techniques. For example, you could keep a ObservableList for the tasks, add a task to the list when it is submitted and remove it when it is finished. Then, you could provide this list to control which can display the status of each task.

Another option could be to write a wrapper for ExecutorService that has implemented this feature, rather than to implement in your model. (I can elaborate a little if it is not clear, but I have not actually tried it myself). If you somehow exposed this wrapper ExecutorService to the entire application and used for all your threading (which he is called to leave FXApplication thread or not) then you could at least be aware of these threads and should be able to monitor their relatively easily. All threads that were not executed via your wrapper ExecutorService would still be difficult to control.

Not sure how much help that is.

Tags: Java

Similar Questions

  • InDesign extension is not displayed when run via the option "Debug as".

    InDesign extension is not displayed when run via the option "Debug as".

    Hi all

    I worked on an application InDesign Extension for a few months now. I am Member creative cloud. I FlashBuilder 4.6 + Extension Builder 2.1 (both licensed versions) and InDesign CS6 and CC installed on my machine. The application is targeted for InDesign CS 5.x and 6 CS and CC versions. So far, I've tested it via "run as" and "Debug as" options of the FB; and in time, I "export as" ZXP for internal versions.

    I'm having two problems, do not know if they are related.

    1. when I try to bundle manifest, it fails with the following error: (at first, I thought it was an installation problem, but I did another test project and bundle manifest works on that one)

    Could not open the Editor: an unexpected exception was thrown.

    Details:

    java.lang.NullPointerException

    at com.adobe.cside.ui.editors.pages.MainBundlePage.isPointProductSupported (unknown Source)

    at com.adobe.cside.ui.editors.pages.MainBundlePage.createTargetAppSection (unknown Source)

    at com.adobe.cside.ui.editors.pages.MainBundlePage.createFormContent (unknown Source)

    to org.eclipse.ui.forms.editor.FormPage$ 1.run(FormPage.java:152)

    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

    at org.eclipse.ui.forms.editor.FormPage.createPartControl(FormPage.java:150)

    at org.eclipse.ui.forms.editor.FormEditor.pageChange(FormEditor.java:471)

    at com.adobe.cside.ui.editors.BundleManifestEditor.pageChange (unknown Source)

    at org.eclipse.ui.part.MultiPageEditorPart.setActivePage(MultiPageEditorPart.java:1067)

    at org.eclipse.ui.forms.editor.FormEditor.setActivePage(FormEditor.java:603)

    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:352)

    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)

    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)

    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)

    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)

    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2945)

    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)

    to org.eclipse.ui.internal.WorkbenchPage.access$ 11 (WorkbenchPage.java:2842)

    to org.eclipse.ui.internal.WorkbenchPage$ 10.run(WorkbenchPage.java:2793)

    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)

    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)

    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2756)

    at com.adobe.cside.ui.popup.actions.CSIDEBundleEditorAction.run (unknown Source)

    at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionI tem.java:584)

    to org.eclipse.jface.action.ActionContributionItem.access$ 2 (ActionContributionItem.java:501)

    to org.eclipse.jface.action.ActionContributionItem$ 5.handleEvent (ActionContributionItem.java:411)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)

    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)

    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)

    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)

    to org.eclipse.ui.internal.Workbench.access$ 4 (Workbench.java:2494)

    to org.eclipse.ui.internal.Workbench$ 7.run(Workbench.java:674)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

    at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start (FlashBuilderApplication.ja goes: 108)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication (EclipseAppLau ncher.java:110)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start (EclipseAppLauncher.jav one: 79)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

    Here is my manifest file:

    <? XML version = "1.0" encoding = "UTF-8"? >

    < ExtensionManifest Version = "2.0" ExtensionBundleId = "ConnectXPress".

    " ExtensionBundleVersion ="1.0.0"xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance ">

    < author >

    <! [CDATA [Swati Sisodia]] >

    < / author >

    < ExtensionList >

    < extension Id = "com.pubpress.CXP.extension1" Version = "1.0" / > "

    < / ExtensionList >

    < ExecutionEnvironment >

    < parameter Listehotes >

    < host name = "IDSN" Version = "7.0" / >

    < host name = "Clement POUPARD" Version = "7.0" / >

    < / parameter Listehotes >

    < LocaleList >

    < Locale code = 'All' / >

    < / LocaleList >

    < RequiredRuntimeList >

    < RequiredRuntime Name = "CSXS" Version = "2.0" / >

    < / RequiredRuntimeList >

    < / ExecutionEnvironment >

    < DispatchInfoList >

    < Id = "com.pubpress.CXP.extension1 extension" >

    < DispatchInfo >

    < resources >

    < SwfPath >./ConnectXPress.swf < / SwfPath >

    < / resource >

    life cycle of the <>

    < AutoVisible > true < / AutoVisible >

    < / life cycle >

    < UI >

    Panel < type > < / Type >

    ConnectXPress < menu > < / Menu >

    < geometry >

    < size >

    < height > 520 < / height >

    < width > 350 < / width >

    < / size >

    < / geometry >

    < icons >

    < Type icon = 'Normal' >./icons/normal_icon.png < / icon >

    < Type icon = "RollOver" >./icons/rollover_icon.png < / icon >

    < Type icon = "Disabled" >./icons/disabled_icon.png < / icon >

    < Type icon = "DarkNormal" >./icons/dark_icon.png < / icon >

    < Type icon = "DarkRollOver" >./icons/dark_icon.png < / icon >

    < / icons >

    < /UI >

    < / DispatchInfo >

    < / extension >

    < / DispatchInfoList >

    < / ExtensionManifest >

    2. my other problem is, I recently changed the name of the project and the name of the application in the Menu, and since I did that, my extension is not displayed when I perform "run as" or "Debug as" Flash Builder. To enforce as / debug as, the code compiles and appears in the folder "bin-debug", the application is triggered, but when I navigate to Windows > Extensions, my extension is not present here. Although when I export as ZXP and install via Extension Manager CS 6 or CC, it shows my last extension in Windows > Extensions with the correct name.

    Any help is very appreciated. Please let me know if I need to provide more information.

    Kind regards

    Swati.

    I've solved both of my problems. And I thought I'll post for others.

    First problem, where the manifest failed Bundle of FlashBuilder, was resolved by a change in the manifest.xml (who lives at /.staged-extension/CSXS). The change I made was tag. Earlier it was (generated by FlashBuilder 4.5):

    I changed it to:

    I did a bit of hit and trial and it seems that FlashBuilder generated 4.5 tag host with the Version with only the specialties of the minimum version while FlashBuilder 4.6 requires that all versions of specialties listed in the Version attribute.

    The second problem of debug/run as not to install the extension properly in InDesign, has been set as a result of the software update of FlashBuilder.

    This is what brought me to do:

    I retraced my steps and realized last thing I did before the "Debug as Adobe InDesign Extension" of in FlashBuilder broke on my machine has been updated InDesign CS6 to the latest available version, which probably ended up with flash/flex versions of InDesign and FlashBuilder. Therefore, perform a fixed update debugging.

  • How to close a pop-up open running in the new thread in Teststand without manual intervention?

    Hello

    I'm keycycle in infinite while loop. There are two ways to break out of the loop

    1. click on the 'OK' button on the pop-up that says "complete the event. The pop up is running in a new thread.

    2 increase the value of the parameter "Reset_Count".

    If I choose the first way the sequence runs completely, but if I choose the second way then execution gets stuck in cleaning and waiting for me to click on the button 'OK' Popup.

    So my question is, is there any way by which I can close the popup without manual intervention?

    I have attached the seq, in case you want to see exactly what is happening.

    Thank you

    Hello.

    Yes, replace the TestStand popup a dialog box with custom of LabVIEW.  Here are my first thoughts on a simple method...

    a.) replace the TS popup with a LabVIEW dialog box.  The LabVIEW dialog box contains an OK button and a loop waiting for an LV notifier.  Simply wait for the notifier of LV (with a timeout of 100 ms) as well as the OK.button.

    Then when you get your external reset to end the test, create an another VI to SET the alert (with data as a Boolean value) system to stop the dialog box.

    Let me know if this can work.  I could put something togther for example, if any.

    Thank you
    PH

  • Network management operations can be run on the event thread?

    Hello

    I am building a HttpRequestDispatcher class. Is it true that you should performs no operation networking on the thread of the event? Currently, my HttpRequestDispatcher class creates a new thread to run on, however I'm looking to do it either threads...

    Thank you!

    Quote from the HttpConnection API

    "An application will lock if an implementation of this interface opens a connection from main event in the thread.

    You must start another thread to perform your HttpConnection. There are some examples in the samples of the plugin or JDE directory. Check under device samples, blackberry folder, then the folder browser.

  • BlackBerry Smartphone Applications running in the background?

    Y at - it somewhere that I can see what applications are running on my "BOLD", and if I can close applications from one place?

    For example, I have often several open applications and press the end button or the back button without actually leaving the app.  Hours later my phone is running slowly and I forgot what apps I may have open and run in the background.

    Is it possible to see which applications are underway with/without entering each of them individually?

    Thank you!!!

    Alex

    On your home screen and more any screen, you can press Menu > Swirch Applications to display those running in the background. Close the is not necessary.

    Always running in the background will be your Homescreen, BBMessenger, Messenges, phone and browser, and maybe other third-party applications that need to run in the background in order to exploit (BBAlerts is a good example).

    Make sure that the browser is not open to an active Web page.

  • Error in the new thread should terminate execution

    Hello

    I have a labview VI (continuous while loop), getting initialized in the subsequence of Initialize section of the main sequence and running in the new thread. An error in the execution of this loop will stop execution of VI, pass the error to Teststand and out the thread. I need to put an end to the execution of the main sequence, when the error event in the new thread (passing initialization). Is it possible to do? I'm getting the popup of error Standard Teststand, when the error event, but when I choose to cancel/Abort, the execution of the main sequence doesn't stop and continues. What is the right way to handle errors for threads running in parallel?

    Thank you best regards &,.

    Juvin Ronny

    Some approaches.

    1) wait on the new thread periodically with a wait with a timeout step zero and "timeout causes error" box unchecked. If the thread is finished and has an error, the step of waiting spread the main thread of the error.

    (2) call the Execution.Terminate () or Execution.Abort () of cleaning up your sequence newthread.

    Hope this helps,

    -Doug

  • Passing parameters to VI in the new thread

    I have a vi constantly running in the main thread of SeqCont.seq. In this vi is a stop button to stop the execution of the vi. How one passes a reference to this stop button, so I can stop this vi of the main.seq?

    I tried to pass the sequencecontext, but a change in the value of the context is not constantly being rated by this vi.

    Why did you delete it! You need a teststand variable to communicate between Teststand and LabVIEW VI to tell the loop to close and therefore complete the VI.

  • Force the tun DLLs in the same thread (wait the user interface Thread)

    Hello

    I want three different DLLs execute in the same thread, but this thread should not be "the Thread interface user. I have here a way to force them to do so?

    Best regards

    Jarrod S. wrote:

    Calls DLL should I really run in the same thread? Or is it required just that they are not running at the same time? In the latter case, you might consider using a semaphore to protect your DLL call, or maybe put all DLL calls into a unique slot - VI with a structure in case of deciding who to call to make. This second option could become more complicated if all calls have different sets of inputs or outputs.

    Using another system running other UI Thread won't work, because these delivery systems each get 4-8 threads to run with.

    HO on...

    Put all calls in an motor action configured to operate in "Other1" (for example) and then use "threadconfig" to set up for a single thread.

    Write a wrapper for each call to EI and...

    Do?

    Ben

  • How to operate the main thread class when PopupScreen is pushed?

    Hi all

    I created shortcut menu custom in my Application. When you click the button, it shows correctly.

    But in my main screen I used webservice. The screen content is watch depends on webservice respons.

    My problem is that when I click on the popup button comes but threat to webservice conversation stops its execution because because of the pop-up screen my screen becomes not developed for execution. and when I remove my mainclass popup screen takes over its performance and result either appears correctly.

    Please, someone tell me how could it be that in the presence of pop-up screen that my thread to call Webservice will be run?

    The approach that I said is the exact stated, so my suspicion is that you have not implemented correctly.

    Here's a way to test.  Add this code in any code that you are is not executed on the event Thread:

    if ( Application.isEventDispatchThread() (
    
    Dialog.alert("Oppsss, this code should not be running on the Event Thread");
    
    }
    

    Of course if you see the dialog box, so that the code runs on the event Thread.

    If you do not, then validate your code, maybe we can find out what you did wrong.

  • Is there possible to see which are the background running processes in the system which is having Windows XP as operating system?

    Is there possible to see which are the background running processes in the system which is having Windows XP as operating system?

    There is no resource manager (or resource monitor) in the XP Task Manager.

    Please read these notes I send to the people who are (sometimes) concerned about the svchost.exe process number they see on their system or when it looks like one of their svchost.exe process has run amok.  We can not all apply to your situation, but I don't want to type in a bunch of stuff once again.  Then get Process Explorer and you will be able to be Omniscient:

    To help understand your processes svchost.exe and what is running under them, read this article and you will be smarter than the average bear:
    http://www.bleepingcomputer.com/tutorials/tutorial129.html

    You may be able to get clues with what is happening with your svchost.exe process using the Task Manager and maybe understand.

    You will always be able to understand what is happening with your svchost.exe process if you use Process Explorer.

    Download Process Explorer, so you can see what is 'really' running on your system, especially behind those svchosts several process see you in the running task manager.

    Download Process Explorer from here:

    http://TechNet.Microsoft.com/en-us/Sysinternals/bb896653.aspx

    You'll like Process Explorer when you get the hang of it.  Process Explorer is the Manager of Windows taskbar on steroids.

    Process Explorer installs nothing so it won't slow down your system since it works only on request.

    Process Explorer can seem a little intimidating at first because it has so much information, but you will begin to make love the way it works when you're looking for performance problems.   You can even say EP you want it to be your new default 'Task Manager' value in the future.  You can always run the original tasks as Manager.

    Once you get Process Explorer running, expand the columns, made drag the corners of the screen for it's largest, etc., so you can see as much information as possible in the window.  Now you can really see what is running on the system.

    Here's a screenshot of my poor system when I use Process Explorer:

    http://img222.imageshack.us/img222/2567/ProcessExplorer.PNG

    The CPU column is usually the most interesting start with performance issues - which uses the most?

    It is OK and normal to have several svchost exe processes running.  Important XP Services are actually running under svchost.exe processes. There are sometimes an XP Service that runs under a svchost.exe process, sometimes there are several Services in XP, which runs under a svchost.exe process.

    Sometimes malware will hide behind a svchost.exe process because the malware knows that you won't be able to find it in the Task Manager.  He will hide behind a svchost.exe process to deceive you, but you can outsmart it.

    Malicious software can disguise itself also seems to be a legitimate process of XP or he could hide under/behind other processes that you see running in Task Manager if you can't see the execution.

    The malware would trick you into thinking you must use a System Restore Point, run a repair install or reinstall your XP from scratch when you really don't.

    Looking at the display in process Explorer, you want the CPU most to be associated with the system idle process.  It's 'free time' on your system, so more time there, more free.

    If you look at the graphs of performance and see red spikes (or not) double click the graphic in the upper left corner to display the graph to use.  Move the mouse over any pics to see what are the causes.  Even if the Spike has already scroll screen, you can still move the mouse over the edge to see what caused.  You can also just wait for a pic to happen and then see what caused the Spike.

  • Batteries changed keyboard - screen is now upside down, the mouse runs in the background - click it moves down, etc.

    Are Windows Vista - changing the batteries in the keyboard, handed over the keyboard and now the screen is in reverse, the mouse runs in the background, entered the Internet - the display is backwards.  Have absolutely NO idea what I did or how to cancel.

    Press Control Alt keys and the top at the same time.

  • An application must run as a background service on the Blackberry mobile phone

    Is it possible to run an application as a background service on the Blackberry mobile phone...

    I want to get the location of the mobile user for every 30 seconds...

    Yes.

    If you use the search engine (see the search box near the top of the right-hand page) you will find other Threads that talk about it.  I found this article too, by searching for "background application.

    http://supportforums.BlackBerry.com/T5/Java-development/create-a-background-application/Ta-p/445226

    With this particular application, you certainly need to a leading component, if only to ask permission to get the location before starting the background processing.  So I think you need to look at creating another entry.  Look again once more, but here is a KB article:

    http://supportforums.BlackBerry.com/T5/Java-development/set-up-an-alternate-entry-point-for-an-appli...

    And you probably want to request permissions.  See the PermissionsAPI example that comes with your tools.

    There is a lot of variation in the ability of GPS on different devices and different levels of the BONE.  It is a good starting point:

    http://supportforums.BlackBerry.com/T5/Java-development/location-APIs-start-to-finish/Ta-p/571949

    I would check the code example that you can see at this link

    Finally, find places is an art, search the Forum a little when you start having problems with it.

    Good luck.

  • App should run in the background to receive push?

    Hello.

    I am currently able to receive notifications of type push my application with the app running in the background. Is this necessary? Do all applications that can receive notifications of type push in the background? Are there better ways to do this?

    Thank you.

    A Thread is not an Application.  Threads always run in the background.  When you ask in the foreground, your application moves to the foreground.  When you ask background, your Application moves to the back.  This seems to be what you want, so what had coded you before was the right thing to do.

    When you call super.close () on a screen, if the screen is the last on the stack, that will close the Application, which will close all Threads.

    Does that help?

  • Application that runs in the background

    Hello

    I have an application which auto runs on the boot device. Currently, the application runs in the background.

    The application is supposed to display a popup to the user screen whenever they capture an image using the native camera application. In the popup screen is a textfield where the user can enter a tag for the captured image.

    The problem is after I have capture an image, I don't see the pop-up screen. Only when I get the app I see the pop-up screen. So, how to display the popup screen without having to enter in my application?

    Any help is very appreciated!

    Thank you

    Saket

    You can use requestForeground to bring your application to the top.

    Another option would be a global popupscreen.

  • How can I get rid of the background yellow when I display an image using the photo viewer?

    Original title: Windows Photo Viewer

    How can I get rid of the background yellow when I display an image using the photo viewer? It gives images a yellow cast.

    Thank you

    Ed Fuller

    How can I get rid of the background yellow when I display an image using the photo viewer? It gives images a yellow cast.

    Thank you

    Ed Fuller

    Hi Ed

    See the following for the patch thread.

    Windows 7 photo viewer shows images with an orange and yellow tint:

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-pictures/window-7-photo-viewer-shows-pictures-with-orange/e5d31c5e-ae84-4EBD-bbe9-9428f410560b

    Concerning

Maybe you are looking for