{"action":"created","issue":{"url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6","labels_url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6/comments","events_url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6/events","html_url":"https://github.com/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6","id":75042330,"number":6,"title":"[fix] open not being called when coming from a deeplink","user":{"login":"Deminetix","id":760516,"avatar_url":"https://avatars.githubusercontent.com/u/760516?v=3","gravatar_id":"","url":"https://api.github.com/users/Deminetix","html_url":"https://github.com/Deminetix","followers_url":"https://api.github.com/users/Deminetix/followers","following_url":"https://api.github.com/users/Deminetix/following{/other_user}","gists_url":"https://api.github.com/users/Deminetix/gists{/gist_id}","starred_url":"https://api.github.com/users/Deminetix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Deminetix/subscriptions","organizations_url":"https://api.github.com/users/Deminetix/orgs","repos_url":"https://api.github.com/users/Deminetix/repos","events_url":"https://api.github.com/users/Deminetix/events{/privacy}","received_events_url":"https://api.github.com/users/Deminetix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-11T01:12:16Z","updated_at":"2015-05-28T01:03:19Z","closed_at":null,"body":"The following scenario's weren't working for me on Android:\r\n\r\n1. App background (not closed), click deeplink, data is available\r\n2. App force closed, click deeplink, data is available\r\n\r\nIn both situations the `/open` request is never made (but in other scenarios it was) so i did some hunting... this line never gets called:\r\n`[Branch.java:283] public boolean initSession(BranchReferralInitListener callback, boolean isReferrable, Activity activity) {`\r\nDue to the the `readAndStripParam(Uri data, Activity activity)` method trying to operate on an activity that isn't defined. \r\n\r\nI changed this line:\r\n`[Branch.java:468] if (data != null && data.isHierarchical()) {`\r\ninto:\r\n`[Branch.java:468] if (data != null && data.isHierarchical() && activity != null) {`\r\nTo make sure that it skipped this step.\r\n\r\nAll seems to be working fine. I didn't make a pull request because i'm not sure if this has adverse affects with other logic/things, but in my testing, every single scenario i've tried seems to be working."},"comment":{"url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/comments/106128295","html_url":"https://github.com/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6#issuecomment-106128295","issue_url":"https://api.github.com/repos/BranchMetrics/Branch-PhoneGap-Cordova-SDK/issues/6","id":106128295,"user":{"login":"keithdmoore","id":954458,"avatar_url":"https://avatars.githubusercontent.com/u/954458?v=3","gravatar_id":"","url":"https://api.github.com/users/keithdmoore","html_url":"https://github.com/keithdmoore","followers_url":"https://api.github.com/users/keithdmoore/followers","following_url":"https://api.github.com/users/keithdmoore/following{/other_user}","gists_url":"https://api.github.com/users/keithdmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/keithdmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keithdmoore/subscriptions","organizations_url":"https://api.github.com/users/keithdmoore/orgs","repos_url":"https://api.github.com/users/keithdmoore/repos","events_url":"https://api.github.com/users/keithdmoore/events{/privacy}","received_events_url":"https://api.github.com/users/keithdmoore/received_events","type":"User","site_admin":false},"created_at":"2015-05-28T01:03:19Z","updated_at":"2015-05-28T01:03:19Z","body":"@Deminetix Were you able to solve this problem?"}}