I want to summarize the role of function keys in Windows Mobile, former Pocket PC, as I got several questions each week on how to use or enable Function keys in this or that application.
Here is a simple information about how function keys work in Windows Mobile.
Continue reading ‘Windows Mobile – the no-go world of Function Keys’ »
An android label/receipt printing app for TCP/IP connected printers
This app is based on my btPrint4 app. In contrast to btPrint4 this time we print on TCP/IP connected printers to port 9100.
As with btPrint4 we have a main activity and one to list available printers and one to list available demo files.
The challenge with ipPrint4 was a replacement for the bluetooth device discovery. This time we have to scan TCP/IP address range for port 9100. This port is also called HP direct printing port and supported by many printers. It behaves similar to telnet and you can just send print commands to the interface.
The second main change to btPrint4 was the printing code. This time we do not have to use a bluetooth socket but a network TCP/IP socket.
A TCP/IP portscanner
If you scan a range of IP addresses in sequence and try to open a port with a timeout of, let’s say 200ms, the scan will take (200msx254, scan from 1 to 254) 50 seconds.
Port scan code Continue reading ‘android: ipPrint4 print label/receipts to ip printer’ »
today Plugins with compact framework
The following today or home screen plugins for Windows Mobile are based on a work of CrisText at codeplex.
The codeplex sources provide a framework to create home screen plugins very easily.
You just start a Form or UserControl and add the attribute “[TodayScreenItem("a unique name")]” before the class. Further on, the framework looks for such plugins dynamically and you can add or remove plugins by just adding or removing DLLs.
I did two plugins, one shows the Intermec device ID and the other enables you to have buttons on the home screen to directly launch applications.
Show some information
The first plugin is very simple. An user control that just shows some static text (see the lower info on the screen shot):
Continue reading ‘Mobile Development: writing today screen plugins the easy way’ »
A Bluetooth Label printer demo
This is my first Android project and I had to learn how to get an Android activity working. I am a Windows Mobile C# developer and had to learn that you have to do many handwritten code in compare to what Visual Studio for SmartDevice development does automatically.
An Android activity consists of many, many files with references to each other. Fortunately an IDE helps you creating and finding all the files and references.
I started with Eclipse and ADT but went over to use Android Studio. Eclipse showed very strange behaving when designing the GUI of my activities.
To print to a bluetooth printer we need several functions:
- A reference to the printer, the BT MAC address
- A socket to communicate with the printer
- A set of demo data
Make the activity more user friendly
- provide a list of Bluetooth devices nearby to be used as target
- move the communication part to a background thread
- a list with demo data
The UI has an EditText holding the BT MAC address and a TextView to hold the demo data reference. Buttons for BT discovery, Connect/Disconnect, Demo select and a Print button. There are two list activities (separate windows or forms): the BT device list and a demo data list. The BT MAC address is filled either manually or by selecting a BT device from the list.
I always try to keep code re-useable and so I implemented some helper classes. Continue reading ‘Android development: a Bluetooth label/receipt printing demo’ »
Uuups, sometimes we are looking for a way to do simple things and do not remeber how easy it was.
Question: How can one hide/show the start icon in taskbar of Windows Mobile 6.1 (and before)?
Answer: Use the API provided by Microsoft for this: SHFullScreen! No need to use FindWindow and subclass, very simple use.
Ah, remeber that this will NOT work on Windows Enbedded Handheld 6.5.3 or Windows Mobile 6.5.3 or whatever you call it. The API will simply not do it’s work.
Here is a C# example for SHFullScreen usage.
Continue reading ‘MobileDevelopment: Using shFullScreen API to show hide Start icon’ »