{"id":16557911,"url":"https://github.com/tellh/autogo","last_synced_at":"2025-03-16T20:30:25.463Z","repository":{"id":127060531,"uuid":"64680262","full_name":"TellH/AutoGo","owner":"TellH","description":"Ease your code, easy go!","archived":false,"fork":false,"pushed_at":"2017-03-15T13:47:05.000Z","size":171,"stargazers_count":123,"open_issues_count":3,"forks_count":16,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-02-27T12:45:38.614Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TellH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-08-01T15:48:13.000Z","updated_at":"2025-02-10T01:24:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6978320-9614-42e6-bd08-d7732691c11f","html_url":"https://github.com/TellH/AutoGo","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/TellH%2FAutoGo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TellH%2FAutoGo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TellH%2FAutoGo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TellH%2FAutoGo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TellH","download_url":"https://codeload.github.com/TellH/AutoGo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243826798,"owners_count":20354221,"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":[],"created_at":"2024-10-11T20:09:01.998Z","updated_at":"2025-03-16T20:30:25.456Z","avatar_url":"https://github.com/TellH.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AutoGo ![AutoGo](https://raw.githubusercontent.com/TellH/AutoGo/master/raw/Go.png)\n[![Download](https://api.bintray.com/packages/tellh/maven/AutoGo/images/download.svg)](https://bintray.com/tellh/maven/AutoGo/_latestVersion)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AutoGo-yellowgreen.svg?style=flat)](http://android-arsenal.com/details/1/4047)\u003cbr\u003e\nAutoGo is a library that bases on the Compile-time annotation just like the butterKnife and dagger. In other word, it will generate \nsome code automatically according to the annotations you add during compiling to emancipate us from boilerplate code.\n\n## Setup\nIn project root  build.gradle:\n```\n    dependencies {\n        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'\n    }\n```\nIn app module build.gradle:\n```\n    apply plugin: 'com.neenbedankt.android-apt'\n    dependencies {\n        compile 'com.tellh:autogo-core:1.0.4'\n        apt 'com.tellh:autogo-compiler:1.0.4'\n    }\n```\n\n## Usage\n- StartActivity in the awesome way.\u003cbr\u003e\nUse the @IntentValue to annotate the fields of the target activity.\nlike this:\n```\npublic class TargetActivity extends AppCompatActivity {\n    //the annotated field should not be private\n    @IntentValue(\"myName\") String name;\n    @IntentValue int age;\n    @IntentValue ArrayList\u003cString\u003e friends;\n    ......\n}\n```\nThen make project(Ctrl+F9).\u003cbr\u003e\nNow, in your SrcActivity you can start the TargetActivity just like this:\n```\n        AutoGo.from(SrcActivity.this)\n                .gotoTargetActivity()\n                .age(18)\n                .myName(\"tlh\")\n                .friends(friends)\n                .go();\n```\nThis code will put the data into an Intent and start activity for you.\nIn the TargetActivity can receive the data through this code:\n```\nAutoGo.assign(this);\n```\nPretty awesome, right?\n\n- Save and restore data with sharedPreference in the awesome way.\u003cbr\u003e\nUse @SharePrefs to annotate the fields of your class :\n```\npublic class Sample{\n    @SharePrefs(\"customKey\")\n    String desc;\n    @SharePrefs\n    Person me;\n    ......\n}\n```\nWhenever you want to sava the data, just Call:\n```\n        AutoGo.save(this);\n```\nThen whenever your want to restore the data to assign the field in your class, just call:\n```\n        AutoGo.restore(this);\n```\n- Save and restore data with Bundle in the awesome way.\u003cbr\u003e\nUse @BundleValue to annotate the fields of your class :\n```\n    @BundleValue\n    Long activityLaunchTime;\n```\nWhenever you want to sava the data, just Call:\n```\n    protected void onSaveInstanceState(android.os.Bundle outState) {\n        AutoGo.save(this, outState);\n        ......\n    }\n```\nThen whenever your want to restore the data to assign the field in your class, just call:\n```\n    protected void onRestoreInstanceState(android.os.Bundle savedInstanceState) {\n        AutoGo.restore(this, savedInstanceState);\n        ......\n    }\n```\n\n## Improve\nIf you have some problem or advice, pleace don't hesitate to raise an issue.\u003cbr\u003e\nJust have fun and hope this will lessen your code :)\n\n## Update\n- In version 1.0.4, add Autogo#goForResult(int requestCode)、setter and getter of Intent. Thanks contribution from @registernet .\n\n## License\n\nApache Version 2.0\u003cbr\u003e\n```\nCopyright 2016 TellH\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the 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,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftellh%2Fautogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftellh%2Fautogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftellh%2Fautogo/lists"}