B4A Library ECS/POS printer USB print library

vvg

Member
Licensed User
Longtime User
 

vvg

Member
Licensed User
Longtime User
Error:
(Exception) java.lang.Exception: java.lang.ArrayIndexOutOfBoundsException: length=8; index=8

My vid - 1155
Pid - 22304
 

mmanso

Active Member
Licensed User
Longtime User
I'm trying to print an image with your library and the result I'm getting is this:



That print has two images... the logo on top and right after (A01) is another image.

The logo is not being well processed. I've another machine with a bluetooth printer and I'm using a library to print the same thing to it. The result is this:



Do you have any ideia why is this happening and if there's anything I can do to fix it?

Apart from this, everything works ok with the library.

Thanks.
 

mmanso

Active Member
Licensed User
Longtime User
Sub Button1_Click
Dim vid As Int
Dim pid As Int
vid=0x4B8
pid=0xE15
pt.connectusb2(vid,pid) '<-- This is the statment that generates the error

Hi there,

Did you manage to sort this issue? I'm having the same problem.

Thanks.
 

mmanso

Active Member
Licensed User
Longtime User
Hi there,

I've fixed the bug in the USBprint.jar that was causing the crash using the method:

B4X:
pt.connectusb2(vid,pid)

If you replace the library by the attached, it will work.

Cheers.
 

Attachments

  • USBprint.jar
    18 KB · Views: 339

Kevin Hartin

Active Member
Licensed User
Any idea why I am getting the following error on compile?
Compile Error:
Linking resources    Error
AndroidManifest.xml:31: error: unexpected element <action> found in <manifest><application><activity>.

I used the Example code which has the manifest as follows;

Manifest:
AddManifestText(
<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="19"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddActivityText(main,
    <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />

    )

The only change I have made to the code is vid=0x1d6B and pid=0x0002 after a Device Info app reported DeviceID 1d6b:0002

Thanks,
Kev
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…