Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Contributor
Posts: 9
Registered: ‎07-10-2010
My Device: bb9000
My Carrier: Analist
Accepted Solution

Printer Bluetooth

[ Edited ]

Hello,

 

I found a sample code for dpp-350 printer bluetooh in this link: http://www.datecs.bg/get_file.php?lang=uk&soft_id=CC5F4062B36CD7ACC0F64F702C381B0B

 

First, I added the PrinterSDK.jar

Properties>Java Build Path> Add External Jar> SDKPrinter.jar

Next, I imported thePrinterSDKTest.java. I think I just need this .java for printer.

 

My problem is in this point. My application does't  pass this point and I don't know the problem.

private PrinterSDK prn = new PrinterSDK();

 

Any idea!?

 

Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printer Bluetooth

[ Edited ]

Welcome to the support forums....

 

Can you explain what you mean by

"My application doesn't  pass this point"

 

Does the application hang or crash?

 

Have you got the printer attached and paired at this point?

 

Have you tried the sample application that comes with that printer driver?

 

I suspect you might get better support direct from the suppliers. 

New Contributor
Posts: 9
Registered: ‎07-10-2010
My Device: bb9000
My Carrier: Analist

Re: Printer Bluetooth

[ Edited ]

The project came with a .alx and worked fine with the device and the printer. The problem is run this project in Eclipse.

 

For print, I just need this variable: PrinterSDK prn = new PrinterSDK();

If this work correctly my problem is solved and I could use the basic commands for printer, for example: prn.printText(), prn.feedPaper();

 

I got the error message with this variable:

Searching installed codfiles for alias 'PrinterSDK'

Searching uninstalled codfiles for alias 'PrinterSDK'

Module 'PrinterSDK' not found.Error starting Module 'PrinterSDK' not found.

 

Is there another way to print in a bluetooth printer?

 

Thanks!

Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printer Bluetooth

I'm guessing (and it is only a guess) that you have not added the cod file associated with the SDK to the device.  I note that there is a PrinterSDK cod included in the package.  Have you installed this on the device?

New Contributor
Posts: 9
Registered: ‎07-10-2010
My Device: bb9000
My Carrier: Analist

Re: Printer Bluetooth

[ Edited ]

No. How to add other .cod file in Eclipse corretly??

Just Import?

Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printer Bluetooth

Just for clarity, is this failing at the compile time, or failing when you load it onto a device/Simulator?

Contributor
Posts: 42
Registered: ‎06-14-2010
My Device: 8900 Bold, 9300
My Carrier: Vodafone

Re: Printer Bluetooth

Hi,

 

This is my first contribution, sorry for bad english :smileywink:

 

I used the same library with JDE 4.1.

In previous application, I create another project adding jar as file of project, i set it as "library project" (project configuration) and then I create a dependence between my project and the "library project" (in the project configuration you can choose another project as library of main).

 

With this printer library I had  two problems:

- to compile it's possible that you must preverify it

- if you need to sign your project, it seems that it's necessary sign some class of PrinterSDK, but the key is not one of standard and i can't sign it.

 

Finally to resolve it, in eclipse I add the .jar as library of project but without export it.

Doing this you can compile your project but when you install it on device or simulator, not work because jar file is not present.

To install the PrinterSDK.jar I install the PrinterSDKTest application (I think you can find PrinterSDK.alx file in download) and with it  the PrinterSDK module is adding to BB (and you can try the application).

 

It's not an elegant solution but is the only that I find.

 

Good luck!

New Contributor
Posts: 9
Registered: ‎07-10-2010
My Device: bb9000
My Carrier: Analist

Re: Printer Bluetooth

Solved! :smileyhappy:

Thx!

Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Printer Bluetooth

Great, can you mark is as solved then?

 

Just for my information, what are the printers like.  I've never used them, but have used Zebra ones, which I quite like.  They have an SDK as well, which I am fighting at the moment (long story)..