2016-01-21 176 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); 
      }); 
    } 
相關問題