{"action":"created","comment":{"url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/comments/72926728","id":72926728,"diff_hunk":"@@ -3142,18 +2045,19 @@ private void setActivityLifeCycleObserver(Application application) {\n \n         @Override\n         public void onActivityCreated(Activity activity, Bundle bundle) {\n+            intentState_ = INTENT_STATE.PENDING;\n             if (BranchViewHandler.getInstance().isInstallOrOpenBranchViewPending(activity.getApplicationContext())) {\n                 BranchViewHandler.getInstance().showPendingBranchView(activity);\n             }\n         }\n \n         @Override\n         public void onActivityStarted(Activity activity) {\n+            intentState_ = INTENT_STATE.PENDING;","path":"Branch-SDK/src/io/branch/referral/Branch.java","position":1452,"original_position":1453,"commit_id":"c3b36ad247ef50b3bc88a9732f0b7a27764a952a","original_commit_id":"5a7e8a3a10d3a3a67061a05f7a23c9124671d6ed","user":{"login":"aaustin","id":1332632,"avatar_url":"https://avatars.githubusercontent.com/u/1332632?v=3","gravatar_id":"","url":"https://api.github.com/users/aaustin","html_url":"https://github.com/aaustin","followers_url":"https://api.github.com/users/aaustin/followers","following_url":"https://api.github.com/users/aaustin/following{/other_user}","gists_url":"https://api.github.com/users/aaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/aaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaustin/subscriptions","organizations_url":"https://api.github.com/users/aaustin/orgs","repos_url":"https://api.github.com/users/aaustin/repos","events_url":"https://api.github.com/users/aaustin/events{/privacy}","received_events_url":"https://api.github.com/users/aaustin/received_events","type":"User","site_admin":false},"body":"Instead of adding this additional latency, can you only do this in Marshmallow or greater? Then any other instance you can just set `INTENT_STATE.READY` in Started.","created_at":"2016-08-01T05:54:15Z","updated_at":"2016-08-01T05:54:15Z","html_url":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271#discussion_r72926728","pull_request_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271","_links":{"self":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/comments/72926728"},"html":{"href":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271#discussion_r72926728"},"pull_request":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271","id":78410474,"html_url":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271","diff_url":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271.diff","patch_url":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271.patch","issue_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/271","number":271,"state":"open","locked":false,"title":"Fix Stale Intent Issue","user":{"login":"sojanpr","id":7651572,"avatar_url":"https://avatars.githubusercontent.com/u/7651572?v=3","gravatar_id":"","url":"https://api.github.com/users/sojanpr","html_url":"https://github.com/sojanpr","followers_url":"https://api.github.com/users/sojanpr/followers","following_url":"https://api.github.com/users/sojanpr/following{/other_user}","gists_url":"https://api.github.com/users/sojanpr/gists{/gist_id}","starred_url":"https://api.github.com/users/sojanpr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sojanpr/subscriptions","organizations_url":"https://api.github.com/users/sojanpr/orgs","repos_url":"https://api.github.com/users/sojanpr/repos","events_url":"https://api.github.com/users/sojanpr/events{/privacy}","received_events_url":"https://api.github.com/users/sojanpr/received_events","type":"User","site_admin":false},"body":"On newer Android devices there seems an issue with calling\n`onNewIntent()` with `singleTop`/`SingleInstance` activities.\n`onNewIntent()` is called after `onStart` method where  it is expected\nto be before `onStart`. To fix the issue moving init requests execution\nto  `onResume` in lifecycle\n\n\n@aaustin @EvangelosG @Sarkar ","created_at":"2016-07-22T00:53:13Z","updated_at":"2016-08-01T05:54:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4d481a0ed59831e298f658255efde8a4f752fa5f","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271/commits","review_comments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271/comments","review_comment_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/271/comments","statuses_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/statuses/c3b36ad247ef50b3bc88a9732f0b7a27764a952a","head":{"label":"BranchMetrics:Fix-Stale-Intent-Issue","ref":"Fix-Stale-Intent-Issue","sha":"c3b36ad247ef50b3bc88a9732f0b7a27764a952a","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20421659,"name":"android-branch-deep-linking","full_name":"BranchMetrics/android-branch-deep-linking","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/android-branch-deep-linking","description":"Deferred Deep Linking SDK for Android apps powered by Branch Metrics. We help mobile apps grow with deep links / deeplinks that power referral systems, sharing links and invites with full attribution and analytics.","fork":false,"url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking","forks_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/forks","keys_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/events","assignees_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/comments{/number}","contents_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/merges","archive_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/releases{/id}","deployments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/deployments","created_at":"2014-06-02T22:17:59Z","updated_at":"2016-07-26T05:48:44Z","pushed_at":"2016-07-29T17:51:12Z","git_url":"git://github.com/BranchMetrics/android-branch-deep-linking.git","ssh_url":"git@github.com:BranchMetrics/android-branch-deep-linking.git","clone_url":"https://github.com/BranchMetrics/android-branch-deep-linking.git","svn_url":"https://github.com/BranchMetrics/android-branch-deep-linking","homepage":"https://dev.branch.io/references/android_sdk/","size":16592,"stargazers_count":77,"watchers_count":77,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":5,"forks":49,"open_issues":5,"watchers":77,"default_branch":"master"}},"base":{"label":"BranchMetrics:master","ref":"master","sha":"e7f730179f2cea532be54cdb1947ddeb59bee3f6","user":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"repo":{"id":20421659,"name":"android-branch-deep-linking","full_name":"BranchMetrics/android-branch-deep-linking","owner":{"login":"BranchMetrics","id":7772941,"avatar_url":"https://avatars.githubusercontent.com/u/7772941?v=3","gravatar_id":"","url":"https://api.github.com/users/BranchMetrics","html_url":"https://github.com/BranchMetrics","followers_url":"https://api.github.com/users/BranchMetrics/followers","following_url":"https://api.github.com/users/BranchMetrics/following{/other_user}","gists_url":"https://api.github.com/users/BranchMetrics/gists{/gist_id}","starred_url":"https://api.github.com/users/BranchMetrics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BranchMetrics/subscriptions","organizations_url":"https://api.github.com/users/BranchMetrics/orgs","repos_url":"https://api.github.com/users/BranchMetrics/repos","events_url":"https://api.github.com/users/BranchMetrics/events{/privacy}","received_events_url":"https://api.github.com/users/BranchMetrics/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BranchMetrics/android-branch-deep-linking","description":"Deferred Deep Linking SDK for Android apps powered by Branch Metrics. We help mobile apps grow with deep links / deeplinks that power referral systems, sharing links and invites with full attribution and analytics.","fork":false,"url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking","forks_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/forks","keys_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/teams","hooks_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/hooks","issue_events_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/events{/number}","events_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/events","assignees_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/assignees{/user}","branches_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/branches{/branch}","tags_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/tags","blobs_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/refs{/sha}","trees_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/statuses/{sha}","languages_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/languages","stargazers_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/stargazers","contributors_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/contributors","subscribers_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/subscribers","subscription_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/subscription","commits_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/commits{/sha}","git_commits_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/git/commits{/sha}","comments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/comments{/number}","issue_comment_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/comments{/number}","contents_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/contents/{+path}","compare_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/merges","archive_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/downloads","issues_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues{/number}","pulls_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls{/number}","milestones_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/milestones{/number}","notifications_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/labels{/name}","releases_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/releases{/id}","deployments_url":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/deployments","created_at":"2014-06-02T22:17:59Z","updated_at":"2016-07-26T05:48:44Z","pushed_at":"2016-07-29T17:51:12Z","git_url":"git://github.com/BranchMetrics/android-branch-deep-linking.git","ssh_url":"git@github.com:BranchMetrics/android-branch-deep-linking.git","clone_url":"https://github.com/BranchMetrics/android-branch-deep-linking.git","svn_url":"https://github.com/BranchMetrics/android-branch-deep-linking","homepage":"https://dev.branch.io/references/android_sdk/","size":16592,"stargazers_count":77,"watchers_count":77,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":5,"forks":49,"open_issues":5,"watchers":77,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271"},"html":{"href":"https://github.com/BranchMetrics/android-branch-deep-linking/pull/271"},"issue":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/271"},"comments":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/BranchMetrics/android-branch-deep-linking/statuses/c3b36ad247ef50b3bc88a9732f0b7a27764a952a"}}}}
{"actor":{"display_login":"aaustin"}}