christopherdro / react-native-print

Print documents using React Native
MIT License
335 stars 145 forks source link

Does it work by connecting usb of the printer? #103

Closed bbeckk closed 3 years ago

bbeckk commented 4 years ago

I checked in real devices(android) and android emulator as well. The app stucks in Searching for printers, doesn't detect the printer. However if I add printShare app from playstore, it detect the printer.

Code:

  printHTML = async() => {
    await RNPrint.print({
      html: '<h1>Hello Doest it</h1><h2>work using</h2><h3>usb in the printer as well.</h3>'
    })
  }

   return (
    <View>
       <Button onPress={this.printHTML} title="Print" />
    </View>
  );

android log:

    --------- beginning of system
12-01 12:32:53.648 2045-2360/system_process I/ActivityManager: START u0 {cmp=com.android.printspooler/.ui.SelectPrinterActivity} from uid 10048 on display 0
12-01 12:32:53.710 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:53.749 4846-4872/com.qrapp D/EGL_emulation: eglMakeCurrent: 0xab702d20: ver 3 0 (tinfo 0xaddeb5b0)
12-01 12:32:53.751 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:53.752 4846-4872/com.qrapp E/Surface: getSlotFromBufferLocked: unknown buffer: 0xb40fc1c0
12-01 12:32:53.779 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:54.011 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:54.021 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:54.127 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:54.142 4419-4433/com.android.printspooler E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa3742e60
12-01 12:32:54.148 4419-4433/com.android.printspooler D/OpenGLRenderer: endAllStagingAnimators on 0xa2e76500 (ListPopupWindow$DropDownListView) with handle 0xaf092e00
12-01 12:32:54.272 4419-4433/com.android.printspooler D/EGL_emulation: eglMakeCurrent: 0xaf093360: ver 3 0 (tinfo 0xaf092780)
12-01 12:32:54.425 2045-2064/system_process I/ActivityManager: Displayed com.android.printspooler/.ui.SelectPrinterActivity: +709ms
12-01 12:32:54.449 4419-4433/com.android.printspooler E/Surface: getSlotFromBufferLocked: unknown buffer: 0xa3743220
12-01 12:32:55.909 1751-2033/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 900737 , only wrote 900282
12-01 12:32:55.909 1751-2033/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 900299 , only wrote 900282
12-01 12:32:55.929 1751-2033/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 901143 , only wrote 900943
12-01 12:32:56.039 1751-2033/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 905824 , only wrote 905570
12-01 12:32:56.729 1751-2034/? W/audio_hw_generic: Not supplying enough data to HAL, expected position 965546 , only wrote 935976
12-01 12:32:59.290 2045-3826/system_process I/AccountManagerService: getTypesVisibleToCaller: isPermitted? true
12-01 12:33:30.168 1245-1314/? D/hwcomposer: hw_composer sent 1967 syncs in 60s
stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.