{"action":"created","comment":{"url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/comments/123441170","pull_request_review_id":45642522,"id":123441170,"diff_hunk":"@@ -27,73 +25,46 @@\n  *\n  *\n  */\n-public class NotificationsPlayerActivity extends Activity implements Observer {\n+public class NotificationsPlayerActivity extends AbstractHookActivity {\n   public final static String getName() {\n     return \"Notifications Demonstration\";\n   }\n-  final String TAG = this.getClass().toString();\n-\n-  String EMBED = null;\n-  String PCODE = null;\n-  String DOMAIN = null;\n-\n-  protected OoyalaPlayerLayoutController playerLayoutController;\n-  protected OoyalaPlayer player;\n-\n-  // Write the sdk events text along with events count to log file in sdcard if the log file already exists\n   SDCardLogcatOoyalaEventsLogger playbacklog = new SDCardLogcatOoyalaEventsLogger();\n \n+  @Override\n+  void completePlayerSetup(boolean asked) {\n+    if (asked) {\n+      //Initialize the player\n+      OoyalaPlayerLayout playerLayout = (OoyalaPlayerLayout) findViewById(R.id.ooyalaPlayer);\n+\n+      Options options = new Options.Builder().setUseExoPlayer(true).build();\n+      player = new OoyalaPlayer(pcode, new PlayerDomain(domain), options);\n+      playerLayoutController = new OoyalaPlayerLayoutController(playerLayout, player);\n+      player.addObserver(this);\n+\n+      if (player.setEmbedCode(embedCode)) {\n+        //player.play();\n+      }\n+    }\n+  }\n+\n   /**\n    * Called when the activity is first created.\n    */\n+\n   @Override\n   public void onCreate(Bundle savedInstanceState) {\n     super.onCreate(savedInstanceState);\n-    setTitle(getName());\n     setContentView(R.layout.player_simple_layout);\n-\n-    EMBED = getIntent().getExtras().getString(\"embed_code\");\n-    PCODE = getIntent().getExtras().getString(\"pcode\");\n-    DOMAIN = getIntent().getExtras().getString(\"domain\");\n-\n-    //Initialize the player\n-    OoyalaPlayerLayout playerLayout = (OoyalaPlayerLayout) findViewById(R.id.ooyalaPlayer);\n-\n-    Options options = new Options.Builder().setUseExoPlayer(true).build();\n-    player = new OoyalaPlayer(PCODE, new PlayerDomain(DOMAIN), options);\n-    playerLayoutController = new OoyalaPlayerLayoutController(playerLayout, player);\n-    player.addObserver(this);\n-\n-    if (player.setEmbedCode(EMBED)) {\n-      player.play();\n-    }\n-\n-  }\n-\n-  @Override\n-  protected void onStop() {\n-    super.onStop();\n-    Log.d(TAG, \"Player Activity Stopped\");\n-    if (player != null) {\n-      player.suspend();\n-    }\n-  }\n-\n-  @Override\n-  protected void onRestart() {\n-    super.onRestart();\n-    Log.d(TAG, \"Player Activity Restarted\");\n-    if (player != null) {\n-      player.resume();\n-    }\n+    completePlayerSetup(asked);\n   }\n \n-\n /** Handle all notifications from the OoyalaPlayer\n-  *  Filter on \"Note\" in logcat logs to see key points in the notification workflow\n-  *  Filter on \"Notification Received:\" in logcat logs to see all notifications in the notification workflow\n-  */\n+ *  Filter on \"Note\" in logcat logs to see key points in the notification workflow\n+ *  Filter on \"Notification Received:\" in logcat logs to see all notifications in the notification workflow\n+ */\n   /** NOTE: there could also be UI-related notifications from your OoyalaPlayerLayoutController or SkinViewController that are not represented here **/\n+","path":"AdvancedPlaybackSampleApp/app/src/main/java/com/ooyala/sample/players/NotificationsPlayerActivity.java","position":109,"original_position":109,"commit_id":"c3943d85c9d40e5a893b1ed45260fc68ef6fa658","original_commit_id":"c3943d85c9d40e5a893b1ed45260fc68ef6fa658","user":{"login":"sgupta3112","id":26733637,"avatar_url":"https://avatars0.githubusercontent.com/u/26733637?v=3","gravatar_id":"","url":"https://api.github.com/users/sgupta3112","html_url":"https://github.com/sgupta3112","followers_url":"https://api.github.com/users/sgupta3112/followers","following_url":"https://api.github.com/users/sgupta3112/following{/other_user}","gists_url":"https://api.github.com/users/sgupta3112/gists{/gist_id}","starred_url":"https://api.github.com/users/sgupta3112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgupta3112/subscriptions","organizations_url":"https://api.github.com/users/sgupta3112/orgs","repos_url":"https://api.github.com/users/sgupta3112/repos","events_url":"https://api.github.com/users/sgupta3112/events{/privacy}","received_events_url":"https://api.github.com/users/sgupta3112/received_events","type":"User","site_admin":false},"body":"Yes, This is working file I checked this on Samsung Note 5 + Android 7.","created_at":"2017-06-22T07:45:35Z","updated_at":"2017-06-22T07:45:35Z","html_url":"https://github.com/ooyala/android-sample-apps/pull/186#discussion_r123441170","pull_request_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186","_links":{"self":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/comments/123441170"},"html":{"href":"https://github.com/ooyala/android-sample-apps/pull/186#discussion_r123441170"},"pull_request":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186"}}},"pull_request":{"url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186","id":122883566,"html_url":"https://github.com/ooyala/android-sample-apps/pull/186","diff_url":"https://github.com/ooyala/android-sample-apps/pull/186.diff","patch_url":"https://github.com/ooyala/android-sample-apps/pull/186.patch","issue_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/186","number":186,"state":"open","locked":false,"title":"Advanced hook","user":{"login":"sgupta3112","id":26733637,"avatar_url":"https://avatars0.githubusercontent.com/u/26733637?v=3","gravatar_id":"","url":"https://api.github.com/users/sgupta3112","html_url":"https://github.com/sgupta3112","followers_url":"https://api.github.com/users/sgupta3112/followers","following_url":"https://api.github.com/users/sgupta3112/following{/other_user}","gists_url":"https://api.github.com/users/sgupta3112/gists{/gist_id}","starred_url":"https://api.github.com/users/sgupta3112/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgupta3112/subscriptions","organizations_url":"https://api.github.com/users/sgupta3112/orgs","repos_url":"https://api.github.com/users/sgupta3112/repos","events_url":"https://api.github.com/users/sgupta3112/events{/privacy}","received_events_url":"https://api.github.com/users/sgupta3112/received_events","type":"User","site_admin":false},"body":"Hi @rcvrgs , \r\n\r\nI have pushed AdvancedPlayback Sample App modified code.\r\n\r\nPlease review it and let me know if any changes required. \r\n\r\nThanks \r\nShivam Gupta","created_at":"2017-05-29T12:15:10Z","updated_at":"2017-06-22T07:45:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75800d41533ada822b0d1b429df1e467aac27136","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186/commits","review_comments_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186/comments","review_comment_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/186/comments","statuses_url":"https://api.github.com/repos/ooyala/android-sample-apps/statuses/c3943d85c9d40e5a893b1ed45260fc68ef6fa658","head":{"label":"ooyala:Advanced_Hook","ref":"Advanced_Hook","sha":"c3943d85c9d40e5a893b1ed45260fc68ef6fa658","user":{"login":"ooyala","id":365274,"avatar_url":"https://avatars0.githubusercontent.com/u/365274?v=3","gravatar_id":"","url":"https://api.github.com/users/ooyala","html_url":"https://github.com/ooyala","followers_url":"https://api.github.com/users/ooyala/followers","following_url":"https://api.github.com/users/ooyala/following{/other_user}","gists_url":"https://api.github.com/users/ooyala/gists{/gist_id}","starred_url":"https://api.github.com/users/ooyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooyala/subscriptions","organizations_url":"https://api.github.com/users/ooyala/orgs","repos_url":"https://api.github.com/users/ooyala/repos","events_url":"https://api.github.com/users/ooyala/events{/privacy}","received_events_url":"https://api.github.com/users/ooyala/received_events","type":"Organization","site_admin":false},"repo":{"id":31042383,"name":"android-sample-apps","full_name":"ooyala/android-sample-apps","owner":{"login":"ooyala","id":365274,"avatar_url":"https://avatars0.githubusercontent.com/u/365274?v=3","gravatar_id":"","url":"https://api.github.com/users/ooyala","html_url":"https://github.com/ooyala","followers_url":"https://api.github.com/users/ooyala/followers","following_url":"https://api.github.com/users/ooyala/following{/other_user}","gists_url":"https://api.github.com/users/ooyala/gists{/gist_id}","starred_url":"https://api.github.com/users/ooyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooyala/subscriptions","organizations_url":"https://api.github.com/users/ooyala/orgs","repos_url":"https://api.github.com/users/ooyala/repos","events_url":"https://api.github.com/users/ooyala/events{/privacy}","received_events_url":"https://api.github.com/users/ooyala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ooyala/android-sample-apps","description":null,"fork":false,"url":"https://api.github.com/repos/ooyala/android-sample-apps","forks_url":"https://api.github.com/repos/ooyala/android-sample-apps/forks","keys_url":"https://api.github.com/repos/ooyala/android-sample-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ooyala/android-sample-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ooyala/android-sample-apps/teams","hooks_url":"https://api.github.com/repos/ooyala/android-sample-apps/hooks","issue_events_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/events{/number}","events_url":"https://api.github.com/repos/ooyala/android-sample-apps/events","assignees_url":"https://api.github.com/repos/ooyala/android-sample-apps/assignees{/user}","branches_url":"https://api.github.com/repos/ooyala/android-sample-apps/branches{/branch}","tags_url":"https://api.github.com/repos/ooyala/android-sample-apps/tags","blobs_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ooyala/android-sample-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/ooyala/android-sample-apps/languages","stargazers_url":"https://api.github.com/repos/ooyala/android-sample-apps/stargazers","contributors_url":"https://api.github.com/repos/ooyala/android-sample-apps/contributors","subscribers_url":"https://api.github.com/repos/ooyala/android-sample-apps/subscribers","subscription_url":"https://api.github.com/repos/ooyala/android-sample-apps/subscription","commits_url":"https://api.github.com/repos/ooyala/android-sample-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/ooyala/android-sample-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/ooyala/android-sample-apps/contents/{+path}","compare_url":"https://api.github.com/repos/ooyala/android-sample-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ooyala/android-sample-apps/merges","archive_url":"https://api.github.com/repos/ooyala/android-sample-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ooyala/android-sample-apps/downloads","issues_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues{/number}","pulls_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/ooyala/android-sample-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/ooyala/android-sample-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ooyala/android-sample-apps/labels{/name}","releases_url":"https://api.github.com/repos/ooyala/android-sample-apps/releases{/id}","deployments_url":"https://api.github.com/repos/ooyala/android-sample-apps/deployments","created_at":"2015-02-19T23:26:06Z","updated_at":"2017-01-05T22:47:01Z","pushed_at":"2017-06-21T23:17:25Z","git_url":"git://github.com/ooyala/android-sample-apps.git","ssh_url":"git@github.com:ooyala/android-sample-apps.git","clone_url":"https://github.com/ooyala/android-sample-apps.git","svn_url":"https://github.com/ooyala/android-sample-apps","homepage":null,"size":85524,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":13,"default_branch":"stable"}},"base":{"label":"ooyala:dev","ref":"dev","sha":"f27dfc7e88ae81229d6c3d5bbcefdcc3b0c715c6","user":{"login":"ooyala","id":365274,"avatar_url":"https://avatars0.githubusercontent.com/u/365274?v=3","gravatar_id":"","url":"https://api.github.com/users/ooyala","html_url":"https://github.com/ooyala","followers_url":"https://api.github.com/users/ooyala/followers","following_url":"https://api.github.com/users/ooyala/following{/other_user}","gists_url":"https://api.github.com/users/ooyala/gists{/gist_id}","starred_url":"https://api.github.com/users/ooyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooyala/subscriptions","organizations_url":"https://api.github.com/users/ooyala/orgs","repos_url":"https://api.github.com/users/ooyala/repos","events_url":"https://api.github.com/users/ooyala/events{/privacy}","received_events_url":"https://api.github.com/users/ooyala/received_events","type":"Organization","site_admin":false},"repo":{"id":31042383,"name":"android-sample-apps","full_name":"ooyala/android-sample-apps","owner":{"login":"ooyala","id":365274,"avatar_url":"https://avatars0.githubusercontent.com/u/365274?v=3","gravatar_id":"","url":"https://api.github.com/users/ooyala","html_url":"https://github.com/ooyala","followers_url":"https://api.github.com/users/ooyala/followers","following_url":"https://api.github.com/users/ooyala/following{/other_user}","gists_url":"https://api.github.com/users/ooyala/gists{/gist_id}","starred_url":"https://api.github.com/users/ooyala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ooyala/subscriptions","organizations_url":"https://api.github.com/users/ooyala/orgs","repos_url":"https://api.github.com/users/ooyala/repos","events_url":"https://api.github.com/users/ooyala/events{/privacy}","received_events_url":"https://api.github.com/users/ooyala/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ooyala/android-sample-apps","description":null,"fork":false,"url":"https://api.github.com/repos/ooyala/android-sample-apps","forks_url":"https://api.github.com/repos/ooyala/android-sample-apps/forks","keys_url":"https://api.github.com/repos/ooyala/android-sample-apps/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ooyala/android-sample-apps/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ooyala/android-sample-apps/teams","hooks_url":"https://api.github.com/repos/ooyala/android-sample-apps/hooks","issue_events_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/events{/number}","events_url":"https://api.github.com/repos/ooyala/android-sample-apps/events","assignees_url":"https://api.github.com/repos/ooyala/android-sample-apps/assignees{/user}","branches_url":"https://api.github.com/repos/ooyala/android-sample-apps/branches{/branch}","tags_url":"https://api.github.com/repos/ooyala/android-sample-apps/tags","blobs_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/refs{/sha}","trees_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ooyala/android-sample-apps/statuses/{sha}","languages_url":"https://api.github.com/repos/ooyala/android-sample-apps/languages","stargazers_url":"https://api.github.com/repos/ooyala/android-sample-apps/stargazers","contributors_url":"https://api.github.com/repos/ooyala/android-sample-apps/contributors","subscribers_url":"https://api.github.com/repos/ooyala/android-sample-apps/subscribers","subscription_url":"https://api.github.com/repos/ooyala/android-sample-apps/subscription","commits_url":"https://api.github.com/repos/ooyala/android-sample-apps/commits{/sha}","git_commits_url":"https://api.github.com/repos/ooyala/android-sample-apps/git/commits{/sha}","comments_url":"https://api.github.com/repos/ooyala/android-sample-apps/comments{/number}","issue_comment_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues/comments{/number}","contents_url":"https://api.github.com/repos/ooyala/android-sample-apps/contents/{+path}","compare_url":"https://api.github.com/repos/ooyala/android-sample-apps/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ooyala/android-sample-apps/merges","archive_url":"https://api.github.com/repos/ooyala/android-sample-apps/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ooyala/android-sample-apps/downloads","issues_url":"https://api.github.com/repos/ooyala/android-sample-apps/issues{/number}","pulls_url":"https://api.github.com/repos/ooyala/android-sample-apps/pulls{/number}","milestones_url":"https://api.github.com/repos/ooyala/android-sample-apps/milestones{/number}","notifications_url":"https://api.github.com/repos/ooyala/android-sample-apps/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ooyala/android-sample-apps/labels{/name}","releases_url":"https://api.github.com/repos/ooyala/android-sample-apps/releases{/id}","deployments_url":"https://api.github.com/repos/ooyala/android-sample-apps/deployments","created_at":"2015-02-19T23:26:06Z","updated_at":"2017-01-05T22:47:01Z","pushed_at":"2017-06-21T23:17:25Z","git_url":"git://github.com/ooyala/android-sample-apps.git","ssh_url":"git@github.com:ooyala/android-sample-apps.git","clone_url":"https://github.com/ooyala/android-sample-apps.git","svn_url":"https://github.com/ooyala/android-sample-apps","homepage":null,"size":85524,"stargazers_count":13,"watchers_count":13,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":13,"default_branch":"stable"}},"_links":{"self":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186"},"html":{"href":"https://github.com/ooyala/android-sample-apps/pull/186"},"issue":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/issues/186"},"comments":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/issues/186/comments"},"review_comments":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186/comments"},"review_comment":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/pulls/186/commits"},"statuses":{"href":"https://api.github.com/repos/ooyala/android-sample-apps/statuses/c3943d85c9d40e5a893b1ed45260fc68ef6fa658"}}}}
{"actor":{"display_login":"sgupta3112"}}