Archive for the ‘Programming’ Category.
April 14, 2014, 07:41
BtPrint4
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.
functions
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
implementation
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’ »
March 26, 2014, 20:33
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’ »
March 12, 2014, 16:18
For whatever reason MS decided to make Windows 2012 RDS (former Terminal Services, now Remote Desktop Services) not compatible with Windows Mobile 6.x and other Windows CE 5.0 based handheld devices.
Fortunately, if you activated Remote Desktop License Server using ‘Web Browser’ method, you simply have to change the Collections Security settings and disable ‘Allow only … Network Level Authentication’ (NLA).
The following can also apply for Windows 2008 R2 Terminal Server. Check if you activate the Licensing server via “Web Browser” connection or directly. My 2008 R2 server is running OK for Windows Mobile, as a stand-alone server, with 100 licenses and activated via “Web Browser”.
But let start at the beginning.
Continue reading ‘Windows Server 2012 RDS and Windows Mobile: connection error’ »
January 25, 2014, 20:13
I again ported the codeproject BarcodeLib to Compact Framework. So feel free to use that, if you need one of the supported linear barcode type.
The VS 2008 / WM5 SDK / Full Framework solution is located at github.
A ready to use binary including the lib is at github.