title: Ionic 2 application to print via Sunmi V1
body: <p>For an ionic 2 app to print using Sunmi V1, added native plugin for printer by executing</p>
  
  <pre><code>cordova plugin add cordova-plugin-printer
  </code></pre>
  
  <p>First I checked whether the printer is available by</p>
  
  <pre><code>checkPrinter() {
      this.printer.check().then(function () {
          alert("Printer available");
      }, function () {
          alert("Printer not available");
      });
  }
  </code></pre>
  
  <p>It alerts "Printer available"</p>
  
  <p>But the below method doesn't prompt any message</p>
  
  <pre><code>printData() {
      this.printer.isAvailable().then(function () {
          this.printer.print("Test Data").then(function () {
              alert("Printed");
          }, function () {
              alert("Printing error");
          });
      }, function () {
          alert('Unavailable');
      });
  }
  </code></pre>
  
  <p>So I called Printer.print method directly as below</p>
  
  <pre><code>printData(){
      this.printer.print("Test Data").then(function () {
          alert("Printed");
      }, function () {
          alert("Printing Error");
      });
  }
  </code></pre>
  
  <p>This method opens Print dialog to choose printer</p>
  
  <p><a href="https://i.stack.imgur.com/kjzj6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kjzj6.png" alt="enter image description here"></a></p>
  
  <p>If I select 'All Printers' from the dropdown to select printer instead of 'Save as PDF', then the search screen appears and keeps on searching...</p>
  
  <p><a href="https://i.stack.imgur.com/2n0G1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2n0G1.png" alt="enter image description here"></a></p>
  
  <p>Is some configuration missing or is it possible to interact with POS printers using cordova printer plugin? </p>
  
  <p>Thanks.</p>