{"id":13905539,"url":"https://github.com/nisrulz/screenshott","last_synced_at":"2025-04-06T06:09:42.577Z","repository":{"id":57721806,"uuid":"55917603","full_name":"nisrulz/screenshott","owner":"nisrulz","description":" [Android Library] Take a screenshot of your view layout , programmatically!","archived":false,"fork":false,"pushed_at":"2020-06-13T22:52:34.000Z","size":602,"stargazers_count":328,"open_issues_count":14,"forks_count":74,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-30T05:05:43.151Z","etag":null,"topics":["android","android-library","bitmap","screenshot"],"latest_commit_sha":null,"homepage":"http://nisrulz.github.io/screenshott/","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/nisrulz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-10T19:15:38.000Z","updated_at":"2024-12-08T09:35:46.000Z","dependencies_parsed_at":"2022-09-26T21:50:26.813Z","dependency_job_id":null,"html_url":"https://github.com/nisrulz/screenshott","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fscreenshott","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fscreenshott/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fscreenshott/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nisrulz%2Fscreenshott/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nisrulz","download_url":"https://codeload.github.com/nisrulz/screenshott/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247441053,"owners_count":20939239,"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-library","bitmap","screenshot"],"created_at":"2024-08-06T23:01:18.156Z","updated_at":"2025-04-06T06:09:42.561Z","avatar_url":"https://github.com/nisrulz.png","language":"Java","funding_links":["https://www.paypal.me/nisrulz/5"],"categories":["Java","Other"],"sub_categories":[],"readme":"![Image](/img/github_banner.png)\n\n### Specs\n[ ![Download](https://api.bintray.com/packages/nisrulz/maven/com.github.nisrulz%3Ascreenshott/images/download.svg) ](https://bintray.com/nisrulz/maven/com.github.nisrulz%3Ascreenshott/_latestVersion) [![API](https://img.shields.io/badge/API-14%2B-orange.svg?style=flat)](https://android-arsenal.com/api?level=14)\n\n### Badges/Featured In\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-Screenshott-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/4963#) [![AndroidDev Digest](https://img.shields.io/badge/AndroidDev%20Digest-%23125-blue.svg)](https://www.androiddevdigest.com/digest-125/)\n\n### Show some :heart: and star the repo to support the project\n[![GitHub stars](https://img.shields.io/github/stars/nisrulz/screenshott.svg?style=social\u0026label=Star)](https://github.com/nisrulz/screenshott) [![GitHub forks](https://img.shields.io/github/forks/nisrulz/screenshott.svg?style=social\u0026label=Fork)](https://github.com/nisrulz/screenshott/fork) [![GitHub watchers](https://img.shields.io/github/watchers/nisrulz/screenshott.svg?style=social\u0026label=Watch)](https://github.com/nisrulz/screenshott) [![GitHub followers](https://img.shields.io/github/followers/nisrulz.svg?style=social\u0026label=Follow)](https://github.com/nisrulz)\n[![Twitter Follow](https://img.shields.io/twitter/follow/nisrulz.svg?style=social)](https://twitter.com/nisrulz)\n\n\nTake a screenshot of your view layout , programmatically!\n\n![sc1](/img/sc1.png)  ![sc2](/img/sc2.png)\n\n# Including in your project\nScreenShott is available in the Jcenter, so getting it as simple as adding it as a dependency\n```gradle\ncompile 'com.github.nisrulz:screenshott:{latest version}'\n```\nwhere `{latest version}` corresponds to published version in [ ![Download](https://api.bintray.com/packages/nisrulz/maven/com.github.nisrulz%3Ascreenshott/images/download.svg) ](https://bintray.com/nisrulz/maven/com.github.nisrulz%3Ascreenshott/_latestVersion)\n\n\n# Usage\n+ Get bitmap of screenshot\n\n  ```java\n  // View with spaces as per constraints\n  Bitmap bitmap_view = ScreenShott.getInstance().takeScreenShotOfView(view);\n\n  // RootView\n  Bitmap bitmap_rootview = ScreenShott.getInstance().takeScreenShotOfRootView(view);\n\n  // Just the View without any constraints\n  Bitmap bitmap_hiddenview = ScreenShott.getInstance().takeScreenShotOfJustView(view);\n\n  // Texture View\n  Bitmap bitmap_textureview= ScreenShott.getInstance().takeScreenShotOfTextureView(textureview);\n  ```\n\n+ Save the bitmap using the provided helper function\n\n  ```java\n  File file = ScreenShott.getInstance().saveScreenshotToPicturesFolder(context, bitmap, \"my_screenshot_filename\");\n  ```\n  You can use the `file` object returned by `saveScreenshotToPicturesFolder()` to get the file object and then the path of the file saved\n\n  ```java\n  String bitmapFilePath = file.getAbsolutePath();\n  ```\n  \u003e Add permission `\u003cuses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/\u003e` to your AndroidManifest.xml\n  \u003e\n  \u003e Request the runtime permission for `android.permission.WRITE_EXTERNAL_STORAGE` to allow saving the file to external storage.\n\n  .. or save the bitmap with your own implementation\n\n\n### Pull Requests\nI welcome and encourage all pull requests. It usually will take me within 24-48 hours to respond to any issue or request. Here are some basic rules to follow to ensure timely addition of your request:\n  1. Match coding style (braces, spacing, etc.) This is best achieved using `CMD`+`Option`+`L` (Reformat code) on Mac (not sure for Windows) with Android Studio defaults.\n  2. If its a feature, bugfix, or anything please only change code to what you specify.\n  3. Please keep PR titles easy to read and descriptive of changes, this will make them easier to merge :)\n  4. Pull requests _must_ be made against `develop` branch. Any other branch (unless specified by the maintainers) will get rejected.\n  5. Check for existing [issues](https://github.com/nisrulz/screenshott/issues) first, before filing an issue.\n  6. Have fun!\n\n### Created \u0026 Maintained By\n[Nishant Srivastava](https://github.com/nisrulz) ([@nisrulz](https://www.twitter.com/nisrulz))\n\n\n\u003e If you found this library helpful or you learned something from the source code and want to thank me, consider buying me a cup of :coffee:\n\u003e  + [PayPal](https://www.paypal.me/nisrulz/5)\n\u003e  + Bitcoin Address: 13PjuJcfVW2Ad81fawqwLtku4bZLv1AxCL\n\nLicense\n=======\n\n    Copyright 2016 Nishant Srivastava\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fscreenshott","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnisrulz%2Fscreenshott","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnisrulz%2Fscreenshott/lists"}