{"id":17054319,"url":"https://github.com/shawnlin013/preferencesmanager","last_synced_at":"2025-04-12T17:06:53.719Z","repository":{"id":240751506,"uuid":"56132835","full_name":"ShawnLin013/PreferencesManager","owner":"ShawnLin013","description":":books: The android library that is used to manage the preferences.","archived":false,"fork":false,"pushed_at":"2017-09-13T02:56:11.000Z","size":99,"stargazers_count":46,"open_issues_count":2,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T11:21:41.755Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShawnLin013.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-04-13T08:03:35.000Z","updated_at":"2024-04-16T15:47:10.000Z","dependencies_parsed_at":"2024-05-20T19:27:55.365Z","dependency_job_id":"a57198ba-db79-4d92-918a-532d0d7d6d2f","html_url":"https://github.com/ShawnLin013/PreferencesManager","commit_stats":null,"previous_names":["shawnlin013/preferencesmanager"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnLin013%2FPreferencesManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnLin013%2FPreferencesManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnLin013%2FPreferencesManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnLin013%2FPreferencesManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShawnLin013","download_url":"https://codeload.github.com/ShawnLin013/PreferencesManager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602310,"owners_count":21131615,"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-14T10:14:33.375Z","updated_at":"2025-04-12T17:06:53.696Z","avatar_url":"https://github.com/ShawnLin013.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Preferences Manager\n\nThe android library that is used to manage the preferences.\n\n[![Platform](http://img.shields.io/badge/platform-android-brightgreen.svg?style=flat)](http://developer.android.com/index.html) [![Language](http://img.shields.io/badge/language-java-orange.svg?style=flat)](http://www.oracle.com/technetwork/java/javase/downloads/index.html) [![License](http://img.shields.io/badge/license-apache2.0-lightgrey.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-PreferencesManager-green.svg?style=true)](http://android-arsenal.com/details/1/3438) [![API](https://img.shields.io/badge/API-15%2B-blue.svg?style=flat)](https://android-arsenal.com/api?level=15) [![Download](https://api.bintray.com/packages/shawnlin013/maven/PreferencesManager/images/download.svg)](https://bintray.com/shawnlin013/maven/PreferencesManager/_latestVersion)\n\n## Usage\n\nInitialize the preferences manager\n\n```java\nnew PreferencesManager(this)\n    .setName(name)\n    .init();\n```\n\nExample 1:\n\n```java\n// put int to preferences\nPreferencesManager.putInt(key, value);\n\n// get int from preferences\nPreferencesManager.getInt(key)\nor \nPreferencesManager.getInt(key, defValue)\n```\n\nExample 2:\n\n```java\n// your object\nclass Person {\n    \n    public String name;\n    \n    public Person(String name) {\n        this.name = name;\n    }\n\n}\n\n// put object to preferences\nPreferencesManager.putObject(key, new Person(name));\n\n// get object from preferences\nPreferencesManager.getObject(key, Person.class);\n```\n\n## Gradle\n\nAdd the dependency in your `build.gradle`\n\n```groovy\nbuildscript {\n    repositories {\n        jcenter()\n    }\n}\n\ndependencies {\n    compile 'com.shawnlin:PreferencesManager:1.0.3'\n}\n```\n\n## License\n\n```\nCopyright (C) 2016 ShawnLin013(Shawn Lin)\n\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\nhttp://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%2Fshawnlin013%2Fpreferencesmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawnlin013%2Fpreferencesmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawnlin013%2Fpreferencesmanager/lists"}