Open YasirNaeem25 opened 4 months ago
@YasirNaeem25 for me printColumnsString function not printing anything other things are working fine did u solved yours and same code printing everything on v2s plus
@sahil-foodbot i print look like this await SunmiPrinter.printColumnsString( ['Order Number', orderNo], [60, 120], // columnWidths [AlignValue.LEFT, AlignValue.RIGHT] );
@YasirNaeem25 @YasirNaeemHw same code but not printing anything for me
SunmiPrinter.printColumnsString(
[contents('prints.discount'), '-$' + orderData.discount],
[120, 60],
[AlignValue.LEFT, AlignValue.RIGHT]
);
this one prints
SunmiPrinter.printerText(contents('prints.ticketCode'))
can you share your whole code and have you faced similar issue with you
@sahil-foodbot i test yesterday SunmiPrinter.printColumnsString(). not printing on client side you have any real device to test?
@YasirNaeemHw i have remotely access to the v3 mix device but i have v2s plus with me code is working on v2s but not on v3 mix
@sahil-foodbot i use a bluetooth printer library because v3mix use bluetooth printer. i waiting to test on v3mix with bluetooth library.
@YasirNaeemHw ok bro if you got success let me know i will try also try to do same.
@sahil-foodbot i able to print on Sunmi devices with the connectivity of via a bluetooth and to to print.i use this libary https://www.npmjs.com/package/react-native-bluetooth-escpos-printer
buildscript { if (project == rootProject) { repositories { google() jcenter() }
dependencies { classpath 'com.android.tools.build:gradle:3.5.3' }
} }
apply plugin: 'com.android.library'
def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback }
android { compileSdkVersion safeExtGet('compileSdkVersion', 33) buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2') defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) targetSdkVersion safeExtGet('targetSdkVersion', 33) versionCode 1 versionName "1.0"
}
buildTypes { release { minifyEnabled false } } lintOptions { disable 'GradleCompatible' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } google() jcenter() }
dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules -- implementation "com.sunmi:printerlibrary:1.0.13" ++ implementation 'com.sunmi:printerlibrary:1.0.18' }
i make changes in build.gradle file but not working on SUNMI V3 Mix
Problem on sunmi v3 mix Do you have any solution yet?
@longphilongdf can you please explain what issue you are getting for me its working fine
can you please explain what issue you are getting for me its working fine
@sahil-foodbot https://www.sunmi.com/en-US/v3-mix/ Everything is working properly except for the printer. When I try to print a receipt, it crashes
can you please explain what issue you are getting for me its working fine
@sahil-foodbot https://www.sunmi.com/en-US/v3-mix/ Everything is working properly except for the printer. When I try to print a receipt, it crashes
any error logged in console that time i am also using v3 mix
any error logged in console that time i am also using v3 mix
@sahil-foodbot Do I have to update to version 1.8.3?
any error logged in console that time i am also using v3 mix
@sahil-foodbot Do I have to update to version 1.8.3?
did you added this in androidmanifest.xml
<queries>
<package android:name="woyou.aidlservice.jiuiv5" />
</queries>
not yet, let me try... Thank you!
printerlibrary
also this on android/build.gradle inside dependencies
implementation 'com.sunmi:printerlibrary:1.0.18'
@YasirNaeem25 for me printColumnsString function not printing anything other things are working fine did u solved yours and same code printing everything on v2s plus
It working but SunmiPrinter.printColumnsString() is error on V3 Mix are u fix it bro
printerlibrary
also this on android/build.gradle inside dependencies
implementation 'com.sunmi:printerlibrary:1.0.18'
It working but SunmiPrinter.printColumnsString() is error on V3 Mix
same happened with me i am using this
await SunmiPrinter.getPrinterPaper().then((data: any) => {
let linesWidth = data == "80mm" ? 42 : 28;
SunmiPrinter.setFontSize(26);
SunmiPrinter.printColumnsText(
[item.quantity + "x " + item.item_display_text, "$" + item.item_price],
// [ linesWidth - 8, 8],
[ linesWidth - 8, 8],
[AlignValue.LEFT, AlignValue.RIGHT]
);
});
printerlibrary
also this on android/build.gradle inside dependencies
implementation 'com.sunmi:printerlibrary:1.0.18'
It working but SunmiPrinter.printColumnsString() is error on V3 Mix
same happened with me i am using this
await SunmiPrinter.getPrinterPaper().then((data: any) => { let linesWidth = data == "80mm" ? 42 : 28; SunmiPrinter.setFontSize(26); SunmiPrinter.printColumnsText( [item.quantity + "x " + item.item_display_text, "$" + item.item_price], // [ linesWidth - 8, 8], [ linesWidth - 8, 8], [AlignValue.LEFT, AlignValue.RIGHT] ); });
let me try! Thank u so much bro!
hi @sahil-foodbot Do you know the error of not being able to open the Drawer? openDrawer()
hi @sahil-foodbot Do you know the error of not being able to open the Drawer? openDrawer()
no have not tried that
hi @sahil-foodbot Do you know the error of not being able to open the Drawer? openDrawer()
no have not tried that
Any idea how to get it to work via Expo? Thanks in advance
buildscript { if (project == rootProject) { repositories { google() jcenter() }
} }
apply plugin: 'com.android.library'
def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback }
android { compileSdkVersion safeExtGet('compileSdkVersion', 33) buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2') defaultConfig { minSdkVersion safeExtGet('minSdkVersion', 21) targetSdkVersion safeExtGet('targetSdkVersion', 33) versionCode 1 versionName "1.0"
}
buildTypes { release { minifyEnabled false } } lintOptions { disable 'GradleCompatible' } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
repositories { mavenLocal() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url("$rootDir/../node_modules/react-native/android") } google() jcenter() }
dependencies { //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" // From node_modules -- implementation "com.sunmi:printerlibrary:1.0.13" ++ implementation 'com.sunmi:printerlibrary:1.0.18' }
i make changes in build.gradle file but not working on SUNMI V3 Mix