{"id":20522029,"url":"https://github.com/pradyuman7/lookatme","last_synced_at":"2025-10-25T01:03:43.717Z","repository":{"id":48127668,"uuid":"173727613","full_name":"Pradyuman7/LookAtMe","owner":"Pradyuman7","description":"VideoView that plays video only when :eyes: are open and :boy: is detected with various other features","archived":false,"fork":false,"pushed_at":"2023-03-28T02:14:58.000Z","size":14804,"stargazers_count":205,"open_issues_count":8,"forks_count":32,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-24T08:05:37.203Z","etag":null,"topics":["android","android-application","android-development","android-library","android-studio","eye-detection","eye-tracker","eye-tracking","face","face-detection","face-recognition","google-vision","java","machine-learning","machinelearning","smile-detection","smiling","videoview"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pradyuman7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T10:54:52.000Z","updated_at":"2025-02-16T06:08:17.000Z","dependencies_parsed_at":"2024-11-15T22:33:50.160Z","dependency_job_id":"ffa8f8a8-79c1-41e7-ab48-2beff7402b3a","html_url":"https://github.com/Pradyuman7/LookAtMe","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pradyuman7%2FLookAtMe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pradyuman7%2FLookAtMe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pradyuman7%2FLookAtMe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pradyuman7%2FLookAtMe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pradyuman7","download_url":"https://codeload.github.com/Pradyuman7/LookAtMe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246922247,"owners_count":20855345,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-application","android-development","android-library","android-studio","eye-detection","eye-tracker","eye-tracking","face","face-detection","face-recognition","google-vision","java","machine-learning","machinelearning","smile-detection","smiling","videoview"],"created_at":"2024-11-15T22:33:43.321Z","updated_at":"2025-10-25T01:03:41.582Z","avatar_url":"https://github.com/Pradyuman7.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LookAtMe\n\n[![](https://jitpack.io/v/Pradyuman7/LookAtMe.svg)](https://jitpack.io/#Pradyuman7/LookAtMe)\n[![API](https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=15)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-LookAtMe-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/7551)\n[![AwesomeAndroid](https://img.shields.io/badge/Awesome_Android-LookAtMe-purple.svg?style=flat)](https://android.libhunt.com/lookatme-alternatives)\n[![Android Weekly](https://img.shields.io/badge/Android_Weekly-LookAtMe-lightblue.svg?style=flat)](https://androidweekly.cn/android-dev-weekly-issue-224/#LookAtMe)\n[![Android Dev Digest](https://img.shields.io/badge/Android_Dev_Digest_222-LookAtMe-orange.svg?style=flat)](https://www.androiddevdigest.com/digest-222/)\n[![Android Sweets](https://img.shields.io/badge/Android_Sweets-LookAtMe-black.svg?style=flat)](https://androidsweets.ongoodbits.com/2019/04/13/read-about-some-good-practices-when-converting-your-code-to-kotlin-and-check-this-weeks-amazing-library-pack)\n[![Android-Tutorial-Online](https://img.shields.io/badge/Android_Tutorial_Online-LookAtMe-maroon.svg?style=flat)](https://www.androidtutorialonline.com/android-library-for-a-videoview/)\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"250\" height=\"250\" src=\"https://user-images.githubusercontent.com/41565823/53729574-dceb1380-3e75-11e9-891b-87e1f12126b0.gif\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  VideoView that plays video only when :eyes: are open and :boy: is detected with various other features\n\u003c/p\u003e\n\n## GIF\n\u003cp align=\"left\"\u003e\n  \u003cimg width=\"300\" height=\"550\" src=\"https://user-images.githubusercontent.com/41565823/53345341-f8ee3280-3914-11e9-8be4-0f4e89ae69db.gif\"\u003e\n\u003c/p\u003e\n\n## AndroidPub (Medium) Post\n\n[You can read the AndroidPub post about this library, the perks it provides and other details here](https://android.jlelse.eu/a-videoview-that-detects-your-face-and-tracks-your-eyes-afc3a04fd735).\n\n## Screenshots\n![screenshot_2019-01-10-07-02-17-959_com pd trackeye](https://user-images.githubusercontent.com/41565823/50949699-8978cc80-14a7-11e9-9899-b99fec80be41.jpg)\n![screenshot_2019-01-10-07-02-22-894_com pd trackeye](https://user-images.githubusercontent.com/41565823/50949700-8978cc80-14a7-11e9-96e8-92eb7cfdb78f.jpg)\n\n## Prerequisites\n\nAdd this in your root `build.gradle` file (**not** your module `build.gradle` file):\n\n\n```gradle\nallprojects {\n\t\trepositories {\n\t\t\t...\n\t\t\tmaven { url 'https://www.jitpack.io' }\n\t\t}\n\t}\n```\n\n## Dependency\n\nAdd this to your module's `build.gradle` file (make sure the version matches the JitPack badge above):\n\n```gradle\ndependencies {\n\t        implementation 'com.github.Pradyuman7:LookAtMe:Version1.0'\n}\n```\n\nFor latest release, please check the JitPack version and match it with the dependency.\n```gradle\ndependencies {\n\t        implementation 'com.github.Pradyuman7:LookAtMe:Version2.0'\n}\n```\n\n## Usage\n\nLookAtMe is very easy to use and can be directly used in your application. You just need to first declare the `LookAtMe` variable in your activity, and add the following in layout of your activity (XML file).\n\n```java\n        private LookAtMe lookAtMe;\n        lookAtMe = findViewById(R.id.lookme);\n```\n\n```XML\n\t\u003ccom.pd.lookatme.LookAtMe\n        \tandroid:id=\"@+id/lookme\"\n        \tandroid:layout_width=\"match_parent\"\n        \tandroid:layout_height=\"250dp\" /\u003e\n```\n\nAfter this, just initiallise `LookAtMe` variable with the activity context, add the video URI, start the video and just call `setLookMe()`, the whole code would look something like this:\n\n```java\n        lookAtMe.init(this);\n        lookAtMe.setVideoURI(Uri.parse(\"android.resource://\" + getPackageName() + \"/\" + R.raw.videoplayback));\n\t// lookAtMe.setVideoPath(\"http://website.com/video/mp4/62000/62792m.mp4\"); to use video from a url\n        \n\tlookAtMe.start();\n        lookAtMe.setLookMe();\n```        \n\nYou can also personalise the experience according to your need, using `init()`. In this method you can add if you want the eye-tracking mode to be `FAST` or `ACCURATE`, and also which camera to use, front or back. The method bodies look like this:\n```java\n\tpublic void init(Context activityContext, String mode, String cameraFace){\n        \t// add mode to be fast or accurate and cameraFace to be front or back\n    \t}\n```\n```java\n\tpublic void init(Context activityContext, String mode){\n        \t// add mode to be accurate or fast   \n    \t}\n```    \n\n### Version2.0 additions\n\nNow in Version2.0 the developer can also access that if the user laughed / smiled during the video. For this, just use this `initWithSmilingStatus()` method instead of the normal `init()` like this:\n\n```java\n\tlookAtMe.initWithSmilingStatus(this); // for smiling status of the user\n```\n\nTo access if the user smiled during the video after this, currently you have to acess the log of the app programatically.\nCurrently, LookAtMe counts when user smiles and for how many frames. If the user smiles for 100 frames in total, LookAtMe logs a line stating that \"the user smiled for 100 Frames!\". After that count resets to 0.\n\nYou can access the log of your android app like this:\n\n```java\n\ttry {\n  \t\tProcess process = Runtime.getRuntime().exec(\"logcat\");\n  \t\tBufferedReader bufferedReader = new BufferedReader(\n  \t\tnew InputStreamReader(process.getInputStream()));\n\n  \t\tStringBuilder log = new StringBuilder();\n  \t\tString line = \"\";\n  \t\twhile ((line = bufferedReader.readLine()) != null) {\n\t    \t\tlog.append(line);\n  \t\t}\n  \t\tTextView tv = (TextView)findViewById(R.id.textView1);\n  \t\ttv.setText(log.toString());\n  \t} \n\tcatch (IOException e) {}\n```\n\nTo know more about this, please refer [this link](https://stackoverflow.com/questions/12692103/read-logcat-programmatically-within-application).\n\n\n\n## Pull Request\n\nHave some new ideas or found a bug? Do not hesitate to open an `issue` and make a `pull request`.\n\n## License\n\n**LookAtME** is under [![License: Apache](https://img.shields.io/badge/License-Apache2.0-black.svg)](https://opensource.org/licenses/MIT). See the [LICENSE](.github/LICENSE.md) file for more info.\n\n## Credits\nThe video being played in the android app is owned solely by Pixar animations and the author lays no claim over the video.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpradyuman7%2Flookatme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpradyuman7%2Flookatme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpradyuman7%2Flookatme/lists"}