labibramadhan / cordova-sunmi-inner-printer

29 stars 32 forks source link

cash drawer open command not working #27

Open dgarunkumar opened 4 years ago

dannyzar commented 4 years ago

any discovery of how to make it work?

tmalbonph commented 4 years ago

@dannyzar are you using as SUNMI device for this? For issue related to SUNMI V1/V2 you can ask here https://github.com/tmalbonph/cordova-plugin-sunmi-inner-printer

dannyzar commented 4 years ago

Yes, I'm using SUNMI T2 mini. This device have a port to connect a cashdrawer and I'm trying to make it work.

tmalbonph commented 4 years ago

@dannyzar Do you have a cordova plugin for this SUNMI T2 device? On sunmi webpage, I can't locate a driver for it but a bunch of *.aidl files were available. Do you have those file too?

tmalbonph commented 4 years ago

@dannyzar In one of the IWoyouService.iadl there is a java method for opening a drawer as follows:

/**
* JIUI T1 print service
* AIDL Version: 2.1
*/

package woyou.aidlservice.jiuiv5;

import woyou.aidlservice.jiuiv5.ICallback;
import android.graphics.Bitmap;
import woyou.aidlservice.jiuiv5.ITax;

interface IWoyouService {

/**
* Open the cash drawer
*/
void openDrawer(in ICallback callback);
}

Maybe you can create a plugin for it and use that method

dannyzar commented 4 years ago

@tmalbonph Yes, I have the .aidl files of this device. I'm trying to make the plugin work using this one's as base and just adding these new functions (openDrawer) to the ./src/android/com/sunmi/innerprinter/Printer.java and ./www/innerprinter.js files. Any other thing you know I should be missing?

tmalbonph commented 4 years ago

@dannyzar Most of the plugin or driver provided by sunmi on there webpage were outdated. If you're using a react maybe you can view issue on openDrawer() here https://github.com/januslo/react-native-sunmi-inner-printer/issues/23

dgarunkumar commented 4 years ago

Yes its working

On Tue, Sep 29, 2020 at 12:41 PM Teddy Albon notifications@github.com wrote:

@dannyzar https://github.com/dannyzar Most of the plugin or driver provided by sunmi on there webpage were outdated. If you're using a react maybe you can view issue on openDrawer() here januslo/react-native-sunmi-inner-printer#23 https://github.com/januslo/react-native-sunmi-inner-printer/issues/23

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/labibramadhan/cordova-sunmi-inner-printer/issues/27#issuecomment-700498090, or unsubscribe https://github.com/notifications/unsubscribe-auth/APBKTGWNXUXE2OWXPCDNVJTSIGCBRANCNFSM4OMI2S4A .

-- Thanks & Regards D.Arunkumar phno:8008000600

tmalbonph commented 4 years ago

@dgarunkumar If it is working, please close this issue as the original owner @labibramadhan no longer maintain this org @labibramadhan/cordova-sunmi-inner-printer .

dannyzar commented 4 years ago

@tmalbonph it's finally working for me, the problem was the functions change their return value in each .aidl file. Thanks for the support.

mjawadyasin commented 2 years ago

@dannyzar for me it is not working after adding files Could you share your solution ?