You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using primary app to call/open a secondary app. In secondary app, retrieving params/vars with startApp.getExtras() works fine if the secondary app is not running. But how can I retrieve vars passed from the primary app if the secondary app is already running in the background?
$ionicPlatform.ready(function() {
function onResume() {
startApp.getExtras(function (inObj) {
console.log("startApp getExtras called") ;
console.log(inObj) ;
}, function (fail) { /* fail */
console.log(fail);
});
}
onResume() ;
// calls function when app is ready
// works fine if app is not running in the background
// vars/params are successfully retrieved
document.addEventListener("resume", onResume, false);
// listens for resuming app sitting in background
// this triggers if app is in background and brought to the foregroun
// it calls the onResume function, BUT, onResume doesn't retrieve vars/params
}
In the secondary app, the addEventListener works, it fires the onResume function when the app is brought to the foreground, however, it doesn't get the vars/params passed into it from the primary app.
On app resume, the console.log(inObj) does output the following object, but none of the vars passed in from Primary app: {profile: "0" }
How can this be resolved?
The text was updated successfully, but these errors were encountered:
rolinger
changed the title
Using startApp.getExtras() to retrieve vars if external app is already open?
Using startApp.getExtras() to retrieve vars if external app is already open in background?
Sep 5, 2020
Using primary app to call/open a secondary app. In secondary app, retrieving params/vars with startApp.getExtras() works fine if the secondary app is not running. But how can I retrieve vars passed from the primary app if the secondary app is already running in the background?
In the secondary app, the addEventListener works, it fires the
onResume
function when the app is brought to the foreground, however, it doesn't get the vars/params passed into it from the primary app.On app resume, the
console.log(inObj)
does output the following object, but none of the vars passed in from Primary app:{profile: "0" }
How can this be resolved?
The text was updated successfully, but these errors were encountered: