Connect to android service

I need to connect to a service (printer driver running in android) from Titanium app. What i need?. A Module to connect or i can connect directly ?. The service is com.cm_soft.printing.IPCLPrinter (printing using bluetooth) is an app (.apk) installed before.

Any idea ?.

Thanks in advance.

1 Answer

  • Unless the installed printing app has an interface for receiving messages, like via intents, you won't be able to pass external messages to it to print. That said, the Android "Send 2 Printer" app apparently has the functionality you described. Here's a link to it and a description of how you can use Android Intents to send it data to print.

    "Send 2 Printer" on Android Market

    Intent setup for using "Send 2 Printer"

    Using Intents in Titanium via Forging Titanium Episode 9: Android Intent Cookbook

    — answered 4 years ago by Tony Lukasavage
    • Thanks, Mr. Tony. According the manual of CMSoft Printer is possible to use intent to pass parameters to the service. This link is an example of this:

      — commented 4 years ago by Leonardo J. Castillo C
    • Judging by that PDF, the code necessary to leverage your existing printing app externally is not as simple as sending an intent. It looks like you need to craft the formatting and configuration of the print job yourself in code. The only way you'd be able to achieve this in Titanium would be to replicate that sample code in a native Android module. here's a link to our documentation on how to do so:

      — commented 4 years ago by Tony Lukasavage
    • Thank you friend. I did not want to use that option but I see that is the only alternative. My knowledge of Java is a bit limited but we will make the effort.

      Thank you again.

      — commented 4 years ago by Leonardo J. Castillo C