{"action":"created","comment":{"url":"https://api.github.com/repos/firebase/quickstart-android/pulls/comments/216500578","pull_request_review_id":153996211,"id":216500578,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjUwMDU3OA==","diff_hunk":"@@ -0,0 +1,253 @@\n+package com.google.firebase.samples.apps.mlkit.kotlin\n+\n+import android.content.Context\n+import android.content.pm.PackageManager\n+import android.os.Bundle\n+import android.support.v4.app.ActivityCompat\n+import android.support.v4.content.ContextCompat\n+import android.support.v7.app.AppCompatActivity\n+import android.util.Log\n+import android.view.View\n+import android.widget.*\n+import com.google.android.gms.common.annotation.KeepName\n+import com.google.firebase.ml.common.FirebaseMLException\n+import com.google.firebase.samples.apps.mlkit.R\n+import com.google.firebase.samples.apps.mlkit.kotlin.barcodescanning.BarcodeScanningProcessor\n+import com.google.firebase.samples.apps.mlkit.kotlin.custommodel.CustomImageClassifierProcessor\n+import com.google.firebase.samples.apps.mlkit.kotlin.facedetection.FaceDetectionProcessor\n+import com.google.firebase.samples.apps.mlkit.kotlin.imagelabeling.ImageLabelingProcessor\n+import com.google.firebase.samples.apps.mlkit.kotlin.textrecognition.CameraSourcePreview\n+import com.google.firebase.samples.apps.mlkit.kotlin.textrecognition.TextRecognitionProcessor\n+import java.io.IOException\n+import java.util.*\n+import kotlinx.android.synthetic.main.activity_live_preview.*\n+\n+/** Demo app showing the various features of ML Kit for Firebase. This class is used to\n+ * set up continuous frame processing on frames from a camera source.  */\n+@KeepName\n+class LivePreviewActivity : AppCompatActivity(), ActivityCompat.OnRequestPermissionsResultCallback, AdapterView.OnItemSelectedListener, CompoundButton.OnCheckedChangeListener {\n+\n+    private var cameraSource: CameraSource? = null\n+    private var preview: CameraSourcePreview? = null\n+    private var graphicOverlay: GraphicOverlay? = null\n+    private var selectedModel = FACE_DETECTION\n+\n+    private val requiredPermissions: Array<String?>\n+        get() {\n+            return try {\n+                val info = this.packageManager\n+                        .getPackageInfo(this.packageName, PackageManager.GET_PERMISSIONS)\n+                val ps = info.requestedPermissions\n+                if (ps != null && ps.isNotEmpty()) {\n+                    ps\n+                } else {\n+                    arrayOfNulls(0)\n+                }\n+            } catch (e: Exception) {\n+                arrayOfNulls(0)\n+            }\n+\n+        }\n+\n+    override fun onCreate(savedInstanceState: Bundle?) {\n+        super.onCreate(savedInstanceState)\n+        Log.d(TAG, \"onCreate\")\n+\n+        setContentView(R.layout.activity_live_preview)\n+\n+        preview = findViewById<View>(R.id.firePreview) as CameraSourcePreview\n+        if (preview == null) {\n+            Log.d(TAG, \"Preview is null\")\n+        }\n+        graphicOverlay = findViewById<View>(R.id.fireFaceOverlay) as GraphicOverlay","path":"mlkit/app/src/main/java/com/google/firebase/samples/apps/mlkit/kotlin/LivePreviewActivity.kt","position":62,"original_position":62,"commit_id":"3280ffc687c3add44ea1d5e6b05f7a4853b52927","original_commit_id":"3280ffc687c3add44ea1d5e6b05f7a4853b52927","user":{"login":"samtstern","id":8466666,"node_id":"MDQ6VXNlcjg0NjY2NjY=","avatar_url":"https://avatars2.githubusercontent.com/u/8466666?v=4","gravatar_id":"","url":"https://api.github.com/users/samtstern","html_url":"https://github.com/samtstern","followers_url":"https://api.github.com/users/samtstern/followers","following_url":"https://api.github.com/users/samtstern/following{/other_user}","gists_url":"https://api.github.com/users/samtstern/gists{/gist_id}","starred_url":"https://api.github.com/users/samtstern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samtstern/subscriptions","organizations_url":"https://api.github.com/users/samtstern/orgs","repos_url":"https://api.github.com/users/samtstern/repos","events_url":"https://api.github.com/users/samtstern/events{/privacy}","received_events_url":"https://api.github.com/users/samtstern/received_events","type":"User","site_admin":false},"body":"Ohh that's an interesting edge case!  I'd say in this case we can leave the dependency on `java` then, thanks for pointing that out.","created_at":"2018-09-10T22:56:15Z","updated_at":"2018-09-10T22:56:15Z","html_url":"https://github.com/firebase/quickstart-android/pull/639#discussion_r216500578","pull_request_url":"https://api.github.com/repos/firebase/quickstart-android/pulls/639","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/comments/216500578"},"html":{"href":"https://github.com/firebase/quickstart-android/pull/639#discussion_r216500578"},"pull_request":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/639"}},"in_reply_to_id":216452839},"pull_request":{"url":"https://api.github.com/repos/firebase/quickstart-android/pulls/639","id":213796208,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEzNzk2MjA4","html_url":"https://github.com/firebase/quickstart-android/pull/639","diff_url":"https://github.com/firebase/quickstart-android/pull/639.diff","patch_url":"https://github.com/firebase/quickstart-android/pull/639.patch","issue_url":"https://api.github.com/repos/firebase/quickstart-android/issues/639","number":639,"state":"open","locked":false,"title":"feat: ML Kit Quickstart Kotlin","user":{"login":"rosariopfernandes","id":16766726,"node_id":"MDQ6VXNlcjE2NzY2NzI2","avatar_url":"https://avatars1.githubusercontent.com/u/16766726?v=4","gravatar_id":"","url":"https://api.github.com/users/rosariopfernandes","html_url":"https://github.com/rosariopfernandes","followers_url":"https://api.github.com/users/rosariopfernandes/followers","following_url":"https://api.github.com/users/rosariopfernandes/following{/other_user}","gists_url":"https://api.github.com/users/rosariopfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/rosariopfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosariopfernandes/subscriptions","organizations_url":"https://api.github.com/users/rosariopfernandes/orgs","repos_url":"https://api.github.com/users/rosariopfernandes/repos","events_url":"https://api.github.com/users/rosariopfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/rosariopfernandes/received_events","type":"User","site_admin":false},"body":"fixed #635 \r\n\r\nBy the time I realized this wasn't one of the simplest quickstarts it was too late. It should probably be one of the last translations. My apologies","created_at":"2018-09-07T01:59:48Z","updated_at":"2018-09-10T22:56:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec0170257b61bb7fc0c6dd5e4ee695c897c67096","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/firebase/quickstart-android/pulls/639/commits","review_comments_url":"https://api.github.com/repos/firebase/quickstart-android/pulls/639/comments","review_comment_url":"https://api.github.com/repos/firebase/quickstart-android/pulls/comments{/number}","comments_url":"https://api.github.com/repos/firebase/quickstart-android/issues/639/comments","statuses_url":"https://api.github.com/repos/firebase/quickstart-android/statuses/3280ffc687c3add44ea1d5e6b05f7a4853b52927","head":{"label":"rosariopfernandes:mlkit-kotlin","ref":"mlkit-kotlin","sha":"3280ffc687c3add44ea1d5e6b05f7a4853b52927","user":{"login":"rosariopfernandes","id":16766726,"node_id":"MDQ6VXNlcjE2NzY2NzI2","avatar_url":"https://avatars1.githubusercontent.com/u/16766726?v=4","gravatar_id":"","url":"https://api.github.com/users/rosariopfernandes","html_url":"https://github.com/rosariopfernandes","followers_url":"https://api.github.com/users/rosariopfernandes/followers","following_url":"https://api.github.com/users/rosariopfernandes/following{/other_user}","gists_url":"https://api.github.com/users/rosariopfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/rosariopfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosariopfernandes/subscriptions","organizations_url":"https://api.github.com/users/rosariopfernandes/orgs","repos_url":"https://api.github.com/users/rosariopfernandes/repos","events_url":"https://api.github.com/users/rosariopfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/rosariopfernandes/received_events","type":"User","site_admin":false},"repo":{"id":147740510,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc3NDA1MTA=","name":"quickstart-android","full_name":"rosariopfernandes/quickstart-android","owner":{"login":"rosariopfernandes","id":16766726,"node_id":"MDQ6VXNlcjE2NzY2NzI2","avatar_url":"https://avatars1.githubusercontent.com/u/16766726?v=4","gravatar_id":"","url":"https://api.github.com/users/rosariopfernandes","html_url":"https://github.com/rosariopfernandes","followers_url":"https://api.github.com/users/rosariopfernandes/followers","following_url":"https://api.github.com/users/rosariopfernandes/following{/other_user}","gists_url":"https://api.github.com/users/rosariopfernandes/gists{/gist_id}","starred_url":"https://api.github.com/users/rosariopfernandes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rosariopfernandes/subscriptions","organizations_url":"https://api.github.com/users/rosariopfernandes/orgs","repos_url":"https://api.github.com/users/rosariopfernandes/repos","events_url":"https://api.github.com/users/rosariopfernandes/events{/privacy}","received_events_url":"https://api.github.com/users/rosariopfernandes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rosariopfernandes/quickstart-android","description":"Firebase Quickstart Samples for Android","fork":true,"url":"https://api.github.com/repos/rosariopfernandes/quickstart-android","forks_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/forks","keys_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/teams","hooks_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/hooks","issue_events_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/issues/events{/number}","events_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/events","assignees_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/assignees{/user}","branches_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/branches{/branch}","tags_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/tags","blobs_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/statuses/{sha}","languages_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/languages","stargazers_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/stargazers","contributors_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/contributors","subscribers_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/subscribers","subscription_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/subscription","commits_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/contents/{+path}","compare_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/merges","archive_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/downloads","issues_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/issues{/number}","pulls_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/pulls{/number}","milestones_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/milestones{/number}","notifications_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/labels{/name}","releases_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/releases{/id}","deployments_url":"https://api.github.com/repos/rosariopfernandes/quickstart-android/deployments","created_at":"2018-09-06T22:27:40Z","updated_at":"2018-09-06T22:27:44Z","pushed_at":"2018-09-10T22:10:02Z","git_url":"git://github.com/rosariopfernandes/quickstart-android.git","ssh_url":"git@github.com:rosariopfernandes/quickstart-android.git","clone_url":"https://github.com/rosariopfernandes/quickstart-android.git","svn_url":"https://github.com/rosariopfernandes/quickstart-android","homepage":"https://firebase.google.com","size":10905,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"firebase:master","ref":"master","sha":"1e1757ffb378188840f50753630f7954e036dadc","user":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"repo":{"id":57147349,"node_id":"MDEwOlJlcG9zaXRvcnk1NzE0NzM0OQ==","name":"quickstart-android","full_name":"firebase/quickstart-android","owner":{"login":"firebase","id":1335026,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMzUwMjY=","avatar_url":"https://avatars2.githubusercontent.com/u/1335026?v=4","gravatar_id":"","url":"https://api.github.com/users/firebase","html_url":"https://github.com/firebase","followers_url":"https://api.github.com/users/firebase/followers","following_url":"https://api.github.com/users/firebase/following{/other_user}","gists_url":"https://api.github.com/users/firebase/gists{/gist_id}","starred_url":"https://api.github.com/users/firebase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/firebase/subscriptions","organizations_url":"https://api.github.com/users/firebase/orgs","repos_url":"https://api.github.com/users/firebase/repos","events_url":"https://api.github.com/users/firebase/events{/privacy}","received_events_url":"https://api.github.com/users/firebase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/firebase/quickstart-android","description":"Firebase Quickstart Samples for Android","fork":false,"url":"https://api.github.com/repos/firebase/quickstart-android","forks_url":"https://api.github.com/repos/firebase/quickstart-android/forks","keys_url":"https://api.github.com/repos/firebase/quickstart-android/keys{/key_id}","collaborators_url":"https://api.github.com/repos/firebase/quickstart-android/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/firebase/quickstart-android/teams","hooks_url":"https://api.github.com/repos/firebase/quickstart-android/hooks","issue_events_url":"https://api.github.com/repos/firebase/quickstart-android/issues/events{/number}","events_url":"https://api.github.com/repos/firebase/quickstart-android/events","assignees_url":"https://api.github.com/repos/firebase/quickstart-android/assignees{/user}","branches_url":"https://api.github.com/repos/firebase/quickstart-android/branches{/branch}","tags_url":"https://api.github.com/repos/firebase/quickstart-android/tags","blobs_url":"https://api.github.com/repos/firebase/quickstart-android/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/firebase/quickstart-android/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/firebase/quickstart-android/git/refs{/sha}","trees_url":"https://api.github.com/repos/firebase/quickstart-android/git/trees{/sha}","statuses_url":"https://api.github.com/repos/firebase/quickstart-android/statuses/{sha}","languages_url":"https://api.github.com/repos/firebase/quickstart-android/languages","stargazers_url":"https://api.github.com/repos/firebase/quickstart-android/stargazers","contributors_url":"https://api.github.com/repos/firebase/quickstart-android/contributors","subscribers_url":"https://api.github.com/repos/firebase/quickstart-android/subscribers","subscription_url":"https://api.github.com/repos/firebase/quickstart-android/subscription","commits_url":"https://api.github.com/repos/firebase/quickstart-android/commits{/sha}","git_commits_url":"https://api.github.com/repos/firebase/quickstart-android/git/commits{/sha}","comments_url":"https://api.github.com/repos/firebase/quickstart-android/comments{/number}","issue_comment_url":"https://api.github.com/repos/firebase/quickstart-android/issues/comments{/number}","contents_url":"https://api.github.com/repos/firebase/quickstart-android/contents/{+path}","compare_url":"https://api.github.com/repos/firebase/quickstart-android/compare/{base}...{head}","merges_url":"https://api.github.com/repos/firebase/quickstart-android/merges","archive_url":"https://api.github.com/repos/firebase/quickstart-android/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/firebase/quickstart-android/downloads","issues_url":"https://api.github.com/repos/firebase/quickstart-android/issues{/number}","pulls_url":"https://api.github.com/repos/firebase/quickstart-android/pulls{/number}","milestones_url":"https://api.github.com/repos/firebase/quickstart-android/milestones{/number}","notifications_url":"https://api.github.com/repos/firebase/quickstart-android/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/firebase/quickstart-android/labels{/name}","releases_url":"https://api.github.com/repos/firebase/quickstart-android/releases{/id}","deployments_url":"https://api.github.com/repos/firebase/quickstart-android/deployments","created_at":"2016-04-26T17:13:27Z","updated_at":"2018-09-10T21:11:05Z","pushed_at":"2018-09-10T22:53:27Z","git_url":"git://github.com/firebase/quickstart-android.git","ssh_url":"git@github.com:firebase/quickstart-android.git","clone_url":"https://github.com/firebase/quickstart-android.git","svn_url":"https://github.com/firebase/quickstart-android","homepage":"https://firebase.google.com","size":10865,"stargazers_count":4377,"watchers_count":4377,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4374,"mirror_url":null,"archived":false,"open_issues_count":36,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":4374,"open_issues":36,"watchers":4377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/639"},"html":{"href":"https://github.com/firebase/quickstart-android/pull/639"},"issue":{"href":"https://api.github.com/repos/firebase/quickstart-android/issues/639"},"comments":{"href":"https://api.github.com/repos/firebase/quickstart-android/issues/639/comments"},"review_comments":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/639/comments"},"review_comment":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/firebase/quickstart-android/pulls/639/commits"},"statuses":{"href":"https://api.github.com/repos/firebase/quickstart-android/statuses/3280ffc687c3add44ea1d5e6b05f7a4853b52927"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"samtstern"}}