Call another Ionic v1 App and receive call data

0

I'm using the plugin "cordova plugin startapp", according to the documentation added to the project (README) I was able to call another package / app (ionic v1), but I'm having problems receiving the sent message on call.

My call went like this:

    $scope.callApp2 = function () {
    var sApp = startApp.set({
        "application":"br.com.pacote.app2"
    },{ /* extras */
        "extraKey1":"extraValue1",
        "extraKey2":"extraValue2"
    }).start();
}

And from what I saw in the documentation the reception would be as follows:

var sApp = startApp.set(["RECEIVER_NAME"]);

sApp.receiver(function(compete) { // if receiver is registered
  console.log("DEU CERTO")
}, function(error) {
  console.log("ERRO")
}, function(action, extras) { // receiver message
  console.log("RECEBEU OS EXTRAS")
});

but I was not able to receive the json "extraKey1", I just got the call. Also, when I add the receive code in the controller of my app it does not load.

The two applications are developed in ionic v1;

Plugin address: link

    
asked by anonymous 12.12.2018 / 20:16

0 answers