{"id":19864180,"url":"https://github.com/sr-lab/ecoandroid","last_synced_at":"2026-03-01T18:31:41.113Z","repository":{"id":106962299,"uuid":"244957301","full_name":"sr-lab/EcoAndroid","owner":"sr-lab","description":"EcoAndroid is an Android Studio plugin that suggests automated refactorings for reducing energy consumption of Java android applications.","archived":false,"fork":false,"pushed_at":"2024-10-08T17:07:00.000Z","size":384555,"stargazers_count":5,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-10-10T21:36:18.218Z","etag":null,"topics":[],"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/sr-lab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-04T17:05:50.000Z","updated_at":"2025-04-27T07:08:28.000Z","dependencies_parsed_at":"2025-05-02T05:30:44.103Z","dependency_job_id":"ad060a8a-70a3-451c-9a8d-e1bc723c8276","html_url":"https://github.com/sr-lab/EcoAndroid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sr-lab/EcoAndroid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-lab%2FEcoAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-lab%2FEcoAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-lab%2FEcoAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-lab%2FEcoAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sr-lab","download_url":"https://codeload.github.com/sr-lab/EcoAndroid/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sr-lab%2FEcoAndroid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29978503,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-11-12T15:17:43.035Z","updated_at":"2026-03-01T18:31:41.088Z","avatar_url":"https://github.com/sr-lab.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EcoAndroid\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"EcoAndroid logo\" /\u003e\n\u003c/p\u003e\n\nEcoAndroid is an [Android Studio plugin](https://plugins.jetbrains.com/plugin/15637-ecoandroid) that suggests automated refactorings for reducing energy consumption of Java android applications. It is also compatible with IntelliJ.\n\n## Installation\n\n### For users of the plugin\nEcoAndroid can be installed from the [JetBrains Plugin Repository](https://plugins.jetbrains.com/plugin/15637-ecoandroid). \n\nAlternatively, you can install the plugin manually by following these steps:\n\n1. Clone this repository\n2. Run `gradle buildPlugin`.\n3. The plugin file is available in the folder `build/distributions/`. You can now install it.\n\n### For developers\nIf you are interested in changing or exploring the source code of the plugin, follow these steps:\n\n1. Clone this repository\n2. Open the project in your favourite IDE\n3. Once you made the desired changes, run `gradle runIde`. An IntelliJ IDE with the plugin activated will open.\n\nIf you wish to add a new refactoring to the plugin, follow these steps:\n\n1. Add a \\\u003clocalInspection\\\u003e element to the plugin.xml file present in `src/main/resources`, following the specifications in the other inspections\n2. Create a subclass of *com.intellij.codeInspection.LocalInspectionTool* (the one stated in the previous step) in the folder of the corresponding energy pattern\n3. Create a subclass of *com.intellij.codeInspection.LocalQuickFix* to apply the refactoring to the source code\n\n## EcoAndroid in Practice\nEcoAndroid has been used to improve the energy efficiency of several Android applications. Examples include:\n\n - [Timetable](https://gitlab.com/asdoi/TimeTable): Cache Energy Pattern([#3](https://gitlab.com/asdoi/TimeTable/-/merge_requests/3))\n - [SecondScreen](https://github.com/farmerbb/SecondScreen): Dynamic Retry Delay and Cache Energy Patterns ([#72](https://github.com/farmerbb/SecondScreen/pull/72))\n - [ZimLX](https://github.com/otakuhqz/ZimLX): Cache Energy Pattern ([#85](https://github.com/otakuhqz/ZimLX/pull/85))\n - [Twire](https://github.com/twireapp/Twire): Cache Energy Pattern ([#111](https://github.com/twireapp/Twire/pull/111))\n - [Taskbar](https://github.com/farmerbb/Taskbar): Cache Energy Pattern ([#138](https://github.com/farmerbb/Taskbar/pull/138))\n - [Audinaut](https://github.com/nvllsvm/Audinaut): Cache Energy Pattern ([#93](https://github.com/nvllsvm/Audinaut/pull/93))\n - [Inwallet](https://github.com/btcontract/lnwallet): Cache Energy Pattern ([#26](https://github.com/btcontract/lnwallet/pull/26))\n - [DownloadNavi](https://github.com/TachibanaGeneralLaboratories/download-navi): Cache Energy Pattern ([#104](https://github.com/TachibanaGeneralLaboratories/download-navi/pull/104))\n - [Omega](https://github.com/otakuhqz/Omega): Cache Energy Pattern ([#3](https://github.com/otakuhqz/Omega/pull/3))\n - [Onpc](https://github.com/De7vID/klingon-assistant-android): Reduce Size Energy Pattern ([#90](https://github.com/De7vID/klingon-assistant-android/pull/90))\n - [tracker-control-android](https://github.com/OxfordHCC/tracker-control-android): Reduce Size Energy Pattern ([#130](https://github.com/OxfordHCC/tracker-control-android/pull/130))\n - [Vanilla-music-lyrics-search](https://github.com/vanilla-music/vanilla-music-lyrics-search): Reduce Size Energy Pattern ([#14](https://github.com/vanilla-music/vanilla-music-lyrics-search/pull/14))\n - [DokuwikiAndroid](https://github.com/fabienli/DokuwikiAndroid): Reduce Size Energy Pattern ([#13](https://github.com/fabienli/DokuwikiAndroid/pull/13))\n\nHave you used EcoAndroid to improve your application? Please let us know so that we can add it to the list above!\n\n## Energy Patterns\nThe energy patterns that are currently detected by EcoAndroid are:\n\n  1. *Dynamic Retry Delay*, with the following cases:\n      - Switching the time a thread goes to sleep from constant to dynamic (only considering the cases where variables are used to put the thread to sleep)\n      - Giving information to the developer about a package to aid while dealing with the retry of work\n      - Checking the network connection before processing a thread\n\n  2. *Push over Poll*, with the following case:\n      - Giving information to the developer about the possibility of implementing push notifications through Firebase Cloud Messaging (FCM) instead of a polling service\n\n  3. *Reduce Size*, with the following case:\n      - Asking for the response to be received compressed by the gzip scheme, if possible\n\n  4.  *Cache*, with the following cases:\n      - Checking the metadata before reloading information\n      - Verifying the size of a view before resetting said view\n      - Switching to *LocationManager.PASSIVE_PROVIDER* when invoking the method *requestLocationUpdates* from the class *android.location.LocationManager*\n      - Increasing the size of the cache on a SSL Session\n      - Creating a *TODO* in the source code for when nothing is different since the last update from an URL connection\n\n  5. *Avoid Graphics and Animations*, with the following case:\n      - Switching the rendering mode to *GLSurfaceView.RENDERMODE_WHEN_DIRTY*\n\nThe examples in the folder src/test are retrieved from real-life mobile applications.\nIn order to make the files more readable, parts of the original source code are either removed or commented.\n\n## Resources\nFor more information about energy patterns, we recommend Cruz and Abreu's [open catalogue of energy-related patterns in mobile applications](https://tqrg.github.io/energy-patterns/#/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr-lab%2Fecoandroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsr-lab%2Fecoandroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsr-lab%2Fecoandroid/lists"}