Open pufanalexandru opened 4 years ago
Ok, meanwhile I found out that you have to copy the strings from plugin.xml to strings.xml of your app and it will work afterwards
Ok, meanwhile I found out that you have to copy the strings from plugin.xml to strings.xml of your app and it will work afterwards
I experienced the same thing. please info how to do it?
Add these lines, which are from your plugin.xml file from node_modules to android/app/src/main/res/values/strings.xml
, inside resources:
<string name="connecting">Connecting...</string>
<string name="err_disconnect_printer">Error disconnecting printer</string>
<string name="err_fetch_st">Error fetching status</string>
<string name="err_fetch_tmp">Error fetching temperature</string>
<string name="err_lines_number">The number of lines must be between 0 and 255</string>
<string name="err_no_bt_adapter">Bluetooth adapter not available</string>
<string name="err_no_bt_device">No Bluetooth device found</string>
<string name="err_feed_paper">Error feeding paper to the printer</string>
<string name="err_print">Error printing</string>
<string name="err_print_barcode">Error printing barcode</string>
<string name="err_print_img">Error printing image</string>
<string name="err_print_rect">Error printing rectangle</string>
<string name="err_print_test">Error printing test page</string>
<string name="err_set_barcode">Error setting barcode settings</string>
<string name="err_bt_socket">Could not create Bluetooth socket</string>
<string name="failed_to_connect">Failed to connect: </string>
<string name="failed_to_comm">Failed to create communication</string>
<string name="failed_to_initialize">Failed to initialize: </string>
<string name="low_battery">Low battery</string>
<string name="no_paper">No paper</string>
<string name="overheating">Overheating</string>
<string name="paper_ok">Paper ok</string>
<string name="printer">Printer</string>
<string name="printer_connected">Printer connected</string>
<string name="printer_disconnected">Printer disconnected</string>
<string name="err_write">Could not write these bytes to this printer</string>
<string name="err_print_qrcode">Error printing QRcode</string>
Add these lines, which are from your plugin.xml file from node_modules to
android/app/src/main/res/values/strings.xml
, inside resources:<string name="connecting">Connecting...</string> <string name="err_disconnect_printer">Error disconnecting printer</string> <string name="err_fetch_st">Error fetching status</string> <string name="err_fetch_tmp">Error fetching temperature</string> <string name="err_lines_number">The number of lines must be between 0 and 255</string> <string name="err_no_bt_adapter">Bluetooth adapter not available</string> <string name="err_no_bt_device">No Bluetooth device found</string> <string name="err_feed_paper">Error feeding paper to the printer</string> <string name="err_print">Error printing</string> <string name="err_print_barcode">Error printing barcode</string> <string name="err_print_img">Error printing image</string> <string name="err_print_rect">Error printing rectangle</string> <string name="err_print_test">Error printing test page</string> <string name="err_set_barcode">Error setting barcode settings</string> <string name="err_bt_socket">Could not create Bluetooth socket</string> <string name="failed_to_connect">Failed to connect: </string> <string name="failed_to_comm">Failed to create communication</string> <string name="failed_to_initialize">Failed to initialize: </string> <string name="low_battery">Low battery</string> <string name="no_paper">No paper</string> <string name="overheating">Overheating</string> <string name="paper_ok">Paper ok</string> <string name="printer">Printer</string> <string name="printer_connected">Printer connected</string> <string name="printer_disconnected">Printer disconnected</string> <string name="err_write">Could not write these bytes to this printer</string> <string name="err_print_qrcode">Error printing QRcode</string>
thanks. this is useful to me
npm i cordova-plugin-datecs-printer is able to install in ionic capacitor? Capacitor CLI : 4.4.0 @capacitor/android : 4.4.0 @capacitor/core : 4.4.0 @capacitor/ios : 4.4.0
Hello,
I'm trying to use this plugin with Ionic 5 and Capacitor 2.0.2 I installed the plugin like this:
npm i cordova-plugin-datecs-printer
and then I rannpx cap sync
. I used your sample service to test the plugin (https://github.com/giorgiofellipe/cordova-plugin-datecs-printer/wiki/Service-DatecsPrinter--for-ionic-4), but no matter which method I try, I get no response (no error, no messages, nothing). Is the plugin compatible with Capacitor, is there something else I'm missing?