{"id":13480896,"url":"https://github.com/androidthings/doorbell","last_synced_at":"2025-03-27T11:31:07.125Z","repository":{"id":97075187,"uuid":"76376140","full_name":"androidthings/doorbell","owner":"androidthings","description":"Cloud-based photo doorbell with companion app","archived":false,"fork":false,"pushed_at":"2021-08-12T09:54:58.000Z","size":3249,"stargazers_count":296,"open_issues_count":9,"forks_count":133,"subscribers_count":33,"default_branch":"master","last_synced_at":"2024-10-30T14:42:44.114Z","etag":null,"topics":["android-things","google-cloud-vision"],"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/androidthings.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-12-13T16:13:25.000Z","updated_at":"2024-09-26T03:26:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"4bb9101e-a087-45e4-baff-225d9a5540c3","html_url":"https://github.com/androidthings/doorbell","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidthings%2Fdoorbell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidthings%2Fdoorbell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidthings%2Fdoorbell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidthings%2Fdoorbell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/androidthings","download_url":"https://codeload.github.com/androidthings/doorbell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245836048,"owners_count":20680310,"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-things","google-cloud-vision"],"created_at":"2024-07-31T17:00:46.339Z","updated_at":"2025-03-27T11:31:06.648Z","avatar_url":"https://github.com/androidthings.png","language":"Java","funding_links":[],"categories":["Useful links","Java"],"sub_categories":["Sample apps and libraries"],"readme":"# Cloud Doorbell\n\nThe Android Things Doorbell sample demonstrates how to create a “smart” doorbell.\nThe sample captures a button press from a user, obtains an image via a camera peripheral,\nprocesses the image data using Google’s Cloud Vision API, and uploads the image, Cloud Vision\nannotations and metadata to a Firebase database where it can be viewed by a companion app.\n\n\u003e **Note:** The Android Things Console will be turned down for non-commercial\n\u003e use on January 5, 2022. For more details, see the\n\u003e [FAQ page](https://developer.android.com/things/faq).\n\n## Screenshots\n\n![Doorbell sample demo][demo-gif]\n\n[(Watch the demo on YouTube)][demo-yt]\n\n## Schematics\n\n![Schematics](schematics.png)\n\n## Pre-requisites\n\n- Android Things compatible board\n- Android Things compatible camera (for example, the Raspberry Pi 3 camera module)\n- Android Studio 2.2+\n- Google Cloud project with Cloud Vision API enabled\n- Firebase project with Database and Storage\n- The following individual components:\n    - 1 push button\n    - 1 resistor\n    - jumper wires\n    - 1 breadboard\n\n## Setup and Build\n\nTo setup, follow these steps below.\n\n1.  Add a valid Google Cloud Vision API key in the constant `CloudVisionUtils.CLOUD_VISION_API_KEY`\n  - Create a Google Cloud Platform (GCP) project on [GCP Console](https://console.cloud.google.com/)\n  - Enable Cloud Vision API under Library\n  - Add an API key under Credentials\n  - Copy and paste the Cloud Vision API key to the constant in `CloudVisionUtils.java`\n\n2.  Add a valid `google-services.json` from Firebase to `app/` and\n    `companionApp/`\n  - Create a Firebase project on [Firebase Console](https://console.firebase.google.com)\n  - Add an Android app with your specific package name in the project\n  - Download the auto-generated `google-services.json` and save to `app/` and `companionApp/` folders\n\n3.  Ensure the security rules for your Firebase project allow public read/write\n    access. **Note:** The rules in this section are set to public read/write for\n    demonstration purposes only.\n  - Firebase -\u003e Database -\u003e Rules:\n\n          {\n            \"rules\": {\n              \".read\": true,\n              \".write\": true\n            }\n          }\n\n  - Firebase -\u003e Storage -\u003e Rules:\n\n          service firebase.storage {\n            match /b/{bucket}/o {\n              match /{allPaths=**} {\n                allow read, write;\n              }\n            }\n          }\n\n\nThere are two modules: `app` and `companionApp`, the former is on device while the latter on\ncompanion device e.g. Android phone.\n\n## Running\n\nTo run the `app` module on an Android Things board:\n\n1. Connect a push button to your device's GPIO pin according to the schematics below\n2. Deploy and run the `app` module\n3. Take a picture by pushing the button\n4. Verify from Firebase Console that pictures are uploaded to a log in the Firebase database\n   of your project\n5. Verify from Firebase Console that the uploaded pictures in the log get annotations after\n   a small delay from the GCP Cloud Vision\n\nTo run the `companionApp` module on your Android phone:\n\n1. Deploy and run the `companionApp` module\n2. Verify that you see a new annotated picture every time you push the button\n\n## Enable auto-launch behavior\n\nThis sample app is currently configured to launch only when deployed from your\ndevelopment machine. To enable the main activity to launch automatically on boot,\nadd the following `intent-filter` to the app's manifest file:\n\n```xml\n\u003cactivity ...\u003e\n\n    \u003cintent-filter\u003e\n        \u003caction android:name=\"android.intent.action.MAIN\"/\u003e\n        \u003ccategory android:name=\"android.intent.category.HOME\"/\u003e\n        \u003ccategory android:name=\"android.intent.category.DEFAULT\"/\u003e\n    \u003c/intent-filter\u003e\n\n\u003c/activity\u003e\n```\n\n## License\n\nCopyright 2016 The Android Open Source Project, Inc.\n\nLicensed to the Apache Software Foundation (ASF) under one or more contributor\nlicense agreements.  See the NOTICE file distributed with this work for\nadditional information regarding copyright ownership.  The ASF licenses this\nfile to you under the Apache License, Version 2.0 (the \"License\"); you may not\nuse this file except in compliance with the License.  You may obtain a copy of\nthe License at\n\n  http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\nWARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the\nLicense for the specific language governing permissions and limitations under\nthe License.\n\n[demo-yt]: https://www.youtube.com/watch?v=lCdlz7tk_oI\u0026list=PLWz5rJ2EKKc-GjpNkFe9q3DhE2voJscDT\u0026index=1\n[demo-gif]: demo1.gif\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidthings%2Fdoorbell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandroidthings%2Fdoorbell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandroidthings%2Fdoorbell/lists"}