How do you kill the EB process when the user presses the 'X' key to exit?  This is WN and CE version.

// Expert user has replied.
G Gregory Bertram 2 years 11 months ago
6 2 0

I have a customer that want to know how to kill the EB process when the user pressed the 'X' key to exit on WM or CE device?

Please register or login to post a reply

2 Replies

V Vedsatx Saddvv

Here's one possibility.  Have them look at the "Feature Demo" app.  The code for that installs on the PC in folder C:\EnterpriseBrowser\Feature-Demo when you install EB.

This app has a bar at the top that looks like a windows app.  The right corner has a button with an X.  When you click that, the app exits.

Here's the button:

It calls this when clicked:
function closeApp() {
  EB.Application.quit();
  }

You can see screenshots of the app here:

P Pietro Francesco Maggi

Another option could be (I've not tested it yet) to register a callback on the "AppDeactivated" notification and call there the EB.Application.quit(); method:

The idea is to use the EB.Application.setApplicationNotify() method to register a call back for the event:
EB.Application.APP_EVENT_DEACTIVATED
http://ebzebra.github.io/docs/1.4/#api-Application
In this way your callback will be called when the application has been deactivated.

You can find more information on the Application API reference.

Ciao
~Pietro

CONTACT
Can’t find what you’re looking for?