{"id":20474023,"url":"https://github.com/drewhamilton/rxpreferences","last_synced_at":"2025-09-08T00:37:55.291Z","repository":{"id":57731129,"uuid":"160934908","full_name":"drewhamilton/RxPreferences","owner":"drewhamilton","description":"An RxJava wrapper for Android's SharedPreferences","archived":false,"fork":false,"pushed_at":"2020-04-25T21:37:12.000Z","size":712,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"3.x","last_synced_at":"2025-04-13T11:40:29.405Z","etag":null,"topics":["android-sharedpreferences","rxjava2","rxjava3"],"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/drewhamilton.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}},"created_at":"2018-12-08T12:02:16.000Z","updated_at":"2023-10-09T04:14:49.000Z","dependencies_parsed_at":"2022-09-26T22:01:48.407Z","dependency_job_id":null,"html_url":"https://github.com/drewhamilton/RxPreferences","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/drewhamilton/RxPreferences","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewhamilton%2FRxPreferences","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewhamilton%2FRxPreferences/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewhamilton%2FRxPreferences/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewhamilton%2FRxPreferences/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drewhamilton","download_url":"https://codeload.github.com/drewhamilton/RxPreferences/tar.gz/refs/heads/3.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drewhamilton%2FRxPreferences/sbom","scorecard":{"id":355983,"data":{"date":"2025-08-11","repo":{"name":"github.com/drewhamilton/RxPreferences","commit":"49eb4c8bdb8969ec86588cc3ba864dd2903f09ab"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/drewhamilton/RxPreferences/ci.yml/3.x?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/drewhamilton/RxPreferences/ci.yml/3.x?enable=pin","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T09:36:00.134Z","repository_id":57731129,"created_at":"2025-08-18T09:36:00.134Z","updated_at":"2025-08-18T09:36:00.134Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274117514,"owners_count":25225103,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android-sharedpreferences","rxjava2","rxjava3"],"created_at":"2024-11-15T14:27:36.640Z","updated_at":"2025-09-08T00:37:55.263Z","avatar_url":"https://github.com/drewhamilton.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RxPreferences\n![](https://github.com/drewhamilton/RxPreferences/workflows/CI/badge.svg?branch=3.x)\n\nAn RxJava wrapper for Android's SharedPreferences.\n\n## Download\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.drewhamilton.rxpreferences/rxpreferences/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.drewhamilton.rxpreferences/rxpreferences)\n\nRxPreferences is available in Maven Central.\n\n```groovy\n// RxPreferences:\nimplementation \"dev.drewhamilton.rxpreferences:rxpreferences:$version\"\n// With Kotlin extensions:\nimplementation \"dev.drewhamilton.rxpreferences:rxpreferences-ktx:$version\"\n// Dagger component:\nimplementation \"dev.drewhamilton.rxpreferences:rxpreferences-dagger:$version\"\n```\n\n## Usage\n\n### RxPreferences\nGet the current value of any preference:\n```java\nrxPreferences.getIntOnce(\"Language count\", 0)\n        .subscribeOn(Schedulers.io())\n        .observeOn(AndroidSchedulers.mainThread())\n        .subscribe(count -\u003e displayCount(count));\n```\n\nObserve the initial value plus any changes to a preference:\n```java\nrxPreferences.getStringStream(\"Favorite language\", \"None\")\n        .subscribeOn(Schedulers.io())\n        .observeOn(AndroidSchedulers.mainThread())\n        .subscribe(name -\u003e displayBestFriend(name));\n```\n\nEdit preferences and monitor the completion of committing those changes:\n```java\nrxPreferences.edit()\n        .putInt(\"Language count\", 1)\n        .putString(\"Favorite language\", \"Java\")\n        .commit()\n        .subscribeOn(Schedulers.io())\n        .observeOn(AndroidSchedulers.mainThread())\n        .subscribe(() -\u003e showSavedIndicator(), error -\u003e displayError(error));\n```\n\n### Kotlin extensions\nWith Kotlin extensions, use the `Editor` as a receiver:\n```kotlin\nrxPreferences.edit {\n    putInt(\"Language count\", 2)\n    putString(\"Favorite language\", \"Kotlin\")\n}.subscribeOn(Schedulers.io())\n    .observeOn(AndroidSchedulers.mainThread())\n    .subscribe({ showSavedIndicator() }, { error -\u003e displayError(error) })\n```\n\n### Dagger component\nEasily provide and access `RxPreferences` instances using `RxPreferencesComponent`:\n```kotlin\n@Module\nobject PersistenceModule {\n\n    private const val sharedPreferencesName = \"example.SharedPreferences\"\n\n    private val ExampleApplication.sharedPreferences\n        get() = getSharedPreferences(sharedPreferencesName, Context.MODE_PRIVATE)\n\n    @JvmStatic\n    @Provides\n    fun preferencesComponent(application: ExampleApplication) =\n        RxPreferencesComponent.create(application.sharedPreferences)\n\n    @JvmStatic\n    @Provides\n    @Reusable\n    fun preferences(preferencesComponent: RxPreferencesComponent) =\n        preferencesComponent.rxPreferences()\n}\n```\n\n## License\n```\nCopyright 2018 Drew Hamilton\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\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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewhamilton%2Frxpreferences","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrewhamilton%2Frxpreferences","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrewhamilton%2Frxpreferences/lists"}