Need help on StarPRNT Plugin using Ionic

I’m using the StarPRNT Plugin in my Ionic 3 project but I can’t seem to get the port where the printer is connected using the portDiscovery() function. Can anyone help me on this please? Here’s my code:

declare let starprnt: any;

@Component({
...
})

export class TestPage {
...
    testConnect() {
        this.platform.ready().then(()=>{
            if (typeof starprnt !== 'undefined') {
                this.testLog = 'starprnt is defined: ' + JSON.stringify(starprnt);
                starprnt.portDiscovery('All',
                    (data) => {
                        this.testLog = 'SUCCESS: ' + JSON.stringify(data);
                    },
                    (err) => {
                        this.testLog = 'ERROR: ' + JSON.stringify(err);
                    }
                );
            }else{
                this.testLog = 'starprnt is undefined';
            }
        });
    }
...
}
1 Like

Did you find a solution for this ??

the same thing happens to me too