{"action":"created","issue":{"url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411","repository_url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking","labels_url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411/labels{/name}","comments_url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411/comments","events_url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411/events","html_url":"https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411","id":282631592,"number":411,"title":"No data passed on resume","user":{"login":"alexandre-pereira","id":6008032,"avatar_url":"https://avatars3.githubusercontent.com/u/6008032?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandre-pereira","html_url":"https://github.com/alexandre-pereira","followers_url":"https://api.github.com/users/alexandre-pereira/followers","following_url":"https://api.github.com/users/alexandre-pereira/following{/other_user}","gists_url":"https://api.github.com/users/alexandre-pereira/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandre-pereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandre-pereira/subscriptions","organizations_url":"https://api.github.com/users/alexandre-pereira/orgs","repos_url":"https://api.github.com/users/alexandre-pereira/repos","events_url":"https://api.github.com/users/alexandre-pereira/events{/privacy}","received_events_url":"https://api.github.com/users/alexandre-pereira/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-12-16T15:51:10Z","updated_at":"2017-12-19T20:08:13Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nIf my Ionic App is open in background, and I click on a branch link in another app, Branch.initSession() is returning me this, after I called it on the platform.resume event.\r\n```\r\n{\"+clicked_branch_link\":false,\"+is_first_session\":false}\r\n```\r\n\r\n\r\n\r\n```\r\nbranchInit() {\r\n    console.log('branchInit');\r\n    // only on devices\r\n    if (!this.platform.is('cordova')) { return }\r\n    const Branch = window['Branch'];\r\n    Branch.initSession(this.checkDeeplink.bind(this));\r\n    //Branch.getLatestReferringParams().then(this.checkDeeplink.bind(this));\r\n    //Branch.getFirstReferringParams().then(this.checkDeeplink.bind(this));\r\n    \r\n  }\r\n\r\n  checkDeeplink(res) {\r\n    console.log(JSON.stringify(res));\r\n    if(res['+clicked_branch_link']) {\r\n      console.log('here');\r\n      this.nav.push('reset-password');\r\n    }\r\n  }\r\n\r\n  constructor(public platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public menu: MenuController) {\r\n    if (localStorage.getItem('access_token')) {\r\n        this.rootPage = ListPage;\r\n    }\r\n    \r\n    platform.ready().then(() => {\r\n      // Okay, so the platform is ready and our plugins are available.\r\n      // Here you can do any higher level native things you might need.\r\n      statusBar.styleDefault();\r\n      splashScreen.hide();      \r\n      this.branchInit();\r\n    });\r\n\r\n    platform.resume.subscribe(() => {\r\n      this.branchInit();\r\n    });\r\n  }\r\n```\r\n\r\n\r\nMy goal is to show a \"Reset Password Page\" after clicking a Branch deep link, wether or not the app is launched in background."},"comment":{"url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/comments/352872012","html_url":"https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411#issuecomment-352872012","issue_url":"https://api.github.com/repos/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/411","id":352872012,"user":{"login":"alexandre-pereira","id":6008032,"avatar_url":"https://avatars3.githubusercontent.com/u/6008032?v=4","gravatar_id":"","url":"https://api.github.com/users/alexandre-pereira","html_url":"https://github.com/alexandre-pereira","followers_url":"https://api.github.com/users/alexandre-pereira/followers","following_url":"https://api.github.com/users/alexandre-pereira/following{/other_user}","gists_url":"https://api.github.com/users/alexandre-pereira/gists{/gist_id}","starred_url":"https://api.github.com/users/alexandre-pereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexandre-pereira/subscriptions","organizations_url":"https://api.github.com/users/alexandre-pereira/orgs","repos_url":"https://api.github.com/users/alexandre-pereira/repos","events_url":"https://api.github.com/users/alexandre-pereira/events{/privacy}","received_events_url":"https://api.github.com/users/alexandre-pereira/received_events","type":"User","site_admin":false},"created_at":"2017-12-19T20:08:13Z","updated_at":"2017-12-19T20:08:13Z","author_association":"NONE","body":"I have the same render than you, except that my issue happens when you click on the link when the app is in background, and not closed. Actually, on the resume event, I always got this data out:\r\n```{\"+clicked_branch_link\":false,\"+is_first_session\":false}```\r\n\r\nI'm on Android, with thoses versions:\r\n```\r\n        \"@angular/common\": \"5.0.3\",\r\n        \"@angular/compiler\": \"5.0.3\",\r\n        \"@angular/compiler-cli\": \"5.0.3\",\r\n        \"@angular/core\": \"5.0.3\",\r\n        \"@angular/forms\": \"5.0.3\",\r\n        \"@angular/http\": \"5.0.3\",\r\n        \"@angular/platform-browser\": \"5.0.3\",\r\n        \"@angular/platform-browser-dynamic\": \"5.0.3\",\r\n        \"@ionic-native/call-number\": \"^4.5.2\",\r\n        \"@ionic-native/core\": \"4.4.0\",\r\n        \"@ionic-native/in-app-purchase-2\": \"^4.5.2\",\r\n        \"@ionic-native/sms\": \"^4.5.2\",\r\n        \"@ionic-native/splash-screen\": \"4.4.0\",\r\n        \"@ionic-native/sqlite\": \"^4.5.2\",\r\n        \"@ionic-native/status-bar\": \"4.4.0\",\r\n        \"@ionic/pro\": \"1.0.16\",\r\n        \"@ionic/storage\": \"2.1.3\",\r\n        \"angular2-jwt\": \"^0.2.3\",\r\n        \"branch-cordova-sdk\": \"^2.6.21\",\r\n        \"call-number\": \"^1.0.1\",\r\n        \"cc.fovea.cordova.purchase\": \"^7.1.0\",\r\n        \"cordova-android\": \"^6.4.0\",\r\n        \"cordova-plugin-device\": \"^1.1.7\",\r\n        \"cordova-plugin-ionic-webview\": \"^1.1.16\",\r\n        \"cordova-plugin-splashscreen\": \"^4.1.0\",\r\n        \"cordova-plugin-whitelist\": \"^1.3.3\",\r\n        \"cordova-sms-plugin\": \"^0.1.11\",\r\n        \"cordova-sqlite-ext\": \"^0.10.6\",\r\n        \"ion2-calendar\": \"^2.1.4\",\r\n        \"ionic-angular\": \"3.9.2\",\r\n        \"ionic-plugin-keyboard\": \"^2.2.1\",\r\n        \"ionicons\": \"3.0.0\",\r\n        \"moment\": \"^2.19.4\",\r\n        \"mx.ferreyra.callnumber\": \"~0.0.2\",\r\n        \"rxjs\": \"5.5.2\",\r\n        \"sw-toolbox\": \"3.6.0\",\r\n        \"zone.js\": \"0.8.18\"\r\n```\r\nIt happens running \"ionic cordova run android -c\""}}
{"actor":{"display_login":"alexandre-pereira"}}