Gobinath Sekar Gobinath Sekar - 4 months ago 112
Android Question

Ionic App launch external android app?

How to launch the external android app from the ionic application.
I want to connect POS printer to my app for printing bill.
Cordova-npm plugin for printer can't work that printer. so i install POS printer android application on my tablet so only i want to integrate the ionic app and pos printing app

Answer

Install: cordova plugin add com.lampa.startapp

Install: cordova plugin add https://github.com/lampaa/com.lampa.startapp.git

finally in ionic to call the external installed app:

$scope.printer = function () {

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