2016-01-21 181 views
1

如何从离子应用程序启动外部Android应用程序。 我想将POS打印机连接到我的应用程序打印帐单。 打印机的Cordova-npm插件无法使用该打印机。所以我在我的平板电脑上安装POS打印机的Android应用程序,以便只有我想的离子应用和POS打印应用离子应用程序启动外部Android应用程序?

+1

你尝试过什么等等远?你的问题含糊不清 - 你能指出你卡在哪里吗? – winhowes

+0

https://github.com/lampaa/com.lampa.startapp –

+0

如何从Ionic应用程序启动外部Android应用程序@winhowes –

回答

1

集成安装:科尔多瓦插件添加com.lampa.startapp

安装:科尔多瓦插件添加https://github.com/lampaa/com.lampa.startapp.git

终于在离子调用外部安装的应用程序:

$ scope.printer =函数(){

 navigator.startApp.start("com.example.possdkforandroid", function (message) { 
       /* success */ 
       alert(" navigator called"); 
       alert(message); 
      }, 
      function (error) { /* error */ 
       console.log(error); 
       alert(error); 
      }); 
    } 
相关问题