Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with Capacitor #156

Open
pufanalexandru opened this issue May 2, 2020 · 5 comments
Open

Compatibility with Capacitor #156

pufanalexandru opened this issue May 2, 2020 · 5 comments

Comments

@pufanalexandru
Copy link

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 ran npx 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?

@pufanalexandru
Copy link
Author

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

@nurielmos
Copy link

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?

@pufanalexandru
Copy link
Author

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>

@nurielmos
Copy link

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

@NilamDesai39
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants