I've done some testing using the createInsecureRfcommSocketToServiceRecord API with mixed results. Using below code I'm able to print on the MZ320 from Android v4.1.2 devices but the same program fails on Android v4.4.3. So far I've tested:

MC40 JB v4.1.2 - Works

TC55 JB v4.1.2 - Works

TC70 KK v4.4.3 - Printer lights up blue led signaling a Bluetooth request but no printing

You have the right idea here. The issue is the way Android handles pairing with devices using Bluetooth standards 2.0 and below. The only way to send info to these devices is to enter a pin on the device, or not pair at all and open a straight insecure socket to it.

Your code looks fine, but apparently KK made a small change to the socket creation method. Try this for lines 15-20 of your sample:

The problem is that using your solution I get a request for a PIN code. And that is something that I'd like to avoid :-)

I think that the problem is that, with the changes in Android v4.4 I cannot start to write immediately on the Bluetooth Socket after having opened it. Putting my thread to sleep for 1s after opening the socket seems to work.

Now, I need to find a better (more reliable) way to wait for the socket to be usable.

Just so I know how to answer, I want to clarify. Ignore pairing from the Android settings and just use the app. Does the Java code you have in your post make the app ask for a pin? It shouldn't, but I want to make sure.

If this is the case, will it work for you?

For your timing issue, I know it's kind of kludgy, but have you tried: