[PAID] ESC/POS Thermal Printing extension (Bluetooth/Network)

When calling this block it should return a list of bytes, it converts the image into bytes, the error indicates that the File_Path reference is empty, which is not the case because I did a debug and it has a path value, the image exists.

I think the problem occurs because I imported the blocks from an image, I am going to try to create them again manually. Notice that the texts and others will not look normal, like they exceed the lengths of the blocks or something like that

I rebuilt all the blocks and it still fails, above you can see the path file of the image.
I don’t understand it, on another screen everything works perfectly

image

Do you like to share a screenshot of the relevant blocks of the working screen including a Do it result of the filename?

Taifun

These are the ones on the other screen that do work.
It’s practically the same procedure.

both screens show the same path of the image

The author of the extension @mmnettime might wamt to provide some support…
Taifun
PS: I now moved your thread into the correct topic

Waiting for the developer @mmnettime to respond, it could take weeks or months, we don’t know, but I leave some additional information

  • extension version: V4
  • ComponentToImage extension works: Yes
  • The image is created from the view (Layout): Yes
  • Image is accessible: Yes
  • On a screen with the same block it works: Yes
  • The file_path variable is empty: No
  • Both jpg and png were tested: Yes
  • Different widths tested: Yes
  • Bluetooth connection established: Yes
  • cache and previous files were deleted: Yes
  • If the image (file_path) is attempted to be shared, it is attached: Yes
    If the image (file_path) is tried to print, an error appears:

image

Result: Attempting to call virtual method ‘android.graphics.Bitmap android.graphics.drawable.BitmapDrawable.getBitmap()’ on a null object reference

Hi @Gaston definitely the extension is not getting access to the image, may be because permissions or something else. If possible send me your .aia so i can help you out.

Hello, my relevant blocks, referring to the process, are the ones published, on another screen I use practically the same ones, without special permissions other than Bluetooth and it works fine.

The image is stored in ASD, if I load it in an image component it loads, if I attach it to share it does too.

Let me understand.

  1. You convert a component to an image in Screen 1.
  2. You can access that image through image and share components in Screen 1
  3. You go to Screen 2
  4. You still can access the image through the components on Screen 2 but you cannot print it.

On screen1 I only have a login interface, on screen2 it is the problem and on screen3 everything works fine.
From both screen2 and screen3 I can access the created images, if I load them in an image component, the components to check files and paths return true.
What happens is really very strange, yesterday I spent all day looking for the problem and I still couldn’t solve it.

Here is an example, generates the image, returns the path, loads it in an image1.picture

image

That in fact is very weird. Could be something related to blocks but is hard to tell if i couldn’t access the project to do a complete debug.

I tried to replicate this scenario and i have a similar error in fact, when the extension can’t access the image. But it makes no sense that the extension can get the image in one screen but not in another.

If you know how to use adb logcat to debug the app. PM me and we can figure this out.

I kept testing, deleted the extension, reloaded it, and everything remains the same, screen 3 without problems, we continue by DM

Thank you @mmnettime for the support, the problem was solved and everything works great.
By the way, my printer model is NICTOM IT01

1 Like

Can you explain the solution and how to avoid the runtime error?

Taifun

Hi Taifun, it was not related to the extension.
Anyways the issue can be prevented if the path of the image is not empty.

1 Like

For some reason that I still don’t know, the variable, despite having the correct path, gave an error, as if it were empty, the solution was after creating the image, pass the variable through starValue to another screen and print

I purchased it and didn’t get the link to download the extension

Sent you a DM