This series shows tips and tricks about using threads in android development. Part 1 describes how to create a thread with an infinite loop. Since we only need the thread while the app is running we must assure that the thread stops when the app is not active.
In this example we create a thread which will execute every n seconds. Look a the following code. We override the onCreate method of the activity and create a thread which will do it’s work and sleep afterward.
What happens if the app is pausing? For instance another app comes to the foreground. The following screen shot from the debugger shows that the thread is still running while the app is not active:
So we need to control the thread and stop it in the onPause method.
The solution is taken from the google article Updating the UI from a Timer. We instantiate a Handler which allows us to process Runnable objects.
The Handler it is bound to the main UI thread of the activity. By calling handler.postDelayed(this, 1000); the new thread is added to message queue (of the main UI thread) and will be run after 1 second.
The rest is easy. We start the thread in the onResume, which is called after onCreate and when the activity comes to the foreground, by calling handler.postDelayed(thread, 0); (parameter 0 shows that there is no delay).
Before adding the thread to the handler we may remove it, to make sure it is not already bound to the handler. onPause does the same:
The ipcas FloppyEmulator V3 supports nearly all disk formats. Also special Formats like CP/M, DEC Rainbow, extended DOS or Stäubli JC3/4/5 are supported.
The parameterization and configuration is complete without jumper.
The configuration tool for products of the ipEther232 family has been thoroughly revised and is now available for download on the respective product websites and in the support section.
Certified Windows drivers enable the installation under
Windows XP with ServicePack 3 (32-Bit)
Windows Server 2003/Vista/7/Server2008 (32-Bit and 64-Bit)
Windows Server 2008 R2 (64-Bit)
Apart from some corrections, the main focus was to improve and enhance the 64-bit driver for ipEther232.
The configuration tool is available for the following products:
Our parent company, Data Respons is presenting medical IT solutions, embedded IT products and implemented project solutions at Stand 229, Hall 9.
Besides Medical Panel PC’s and Displays you will also find the fanless Medical Box PC and the Panasonic Toughbook H1 among the special highlights.
Medical Toughbook
The Toughbook H1 ensures that caregivers have all the tools they need in a single mobile clinical assistant (MCA). This medical touchscreen device has hot-swappable twin batteries and is IP65 certifed. In addition to a camera on the back, this compact device has RFID and a barcode scanner on the bottom.
Medical Box-PC
The Medical Box-PC is a Intel® Core™ i7 Fanless System with FireWire (IEEE 1394b), eSATA, HDMI, VGA, DVI, USB, 2x GbE LAN, RS232/422/485 and more interfaces.
If that’s not enough, the Medical PC can expand via PCI respectively PCIe.
Visit the Data Respons at stand 229 in hall 9, it’s worth it.
Today is the last day of embedded world 2011.
Today and tomorrow, we would be happy to see you and give you a live display of our produce. Visit us at embedded world 2011, Stand 129 in Hall 9 in the Nuremberg Trade Fair Center (Nürnberg Messe).
We will be more than glad to support you with first-hand information on our highly innovative Hardware and Software products and concepts. We would be happy to see you and give you a live display of our produce from today until 3 March 2011 at Stand 129 in Hall 9 in the Nuremberg Trade Fair Center (Messezentrum Nürnberg).
Also this year we proudly present a very special highlight:
Floppy emulator V3
The extended version of our Floppy-Emulator is to be at the ready.
In addition to higher compatibility, even to exotic disk formats, the configuration and setup is all done via graphical user interface on the PC.
Now jumpers are a thing of the past.
Take the chance to see the Floppy-Emulator 2 live at the embedded world 2011 until Thursday. Visit us at Hall 9, Stand 129.