Connect to android service

You must Login before you can answer or comment on any questions.

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 3 years ago by Tony Lukasavage
answer permalink
3 Comments
  • 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: http://www.cm-soft.com/Manuals/CMSoft_Printer_AN_SDK.pdf

    — commented 3 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: http://wiki.appcelerator.org/display/guides/Module+Developer+Guide+for+Android

    — commented 3 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 3 years ago by Leonardo J. Castillo C

Your Answer

Think you can help? Login to answer this question!