{"id":21130367,"url":"https://github.com/tasomaniac/IntegrationPreference","last_synced_at":"2025-07-09T01:33:19.682Z","repository":{"id":57727467,"uuid":"44269026","full_name":"tasomaniac/IntegrationPreference","owner":"tasomaniac","description":"Preference subclass that goes into your PreferenceFragment. ","archived":false,"fork":false,"pushed_at":"2018-09-30T13:45:12.000Z","size":297,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-06T04:34:00.669Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tasomaniac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-10-14T18:47:48.000Z","updated_at":"2020-10-08T18:28:47.000Z","dependencies_parsed_at":"2022-09-26T21:51:26.190Z","dependency_job_id":null,"html_url":"https://github.com/tasomaniac/IntegrationPreference","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tasomaniac/IntegrationPreference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FIntegrationPreference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FIntegrationPreference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FIntegrationPreference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FIntegrationPreference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tasomaniac","download_url":"https://codeload.github.com/tasomaniac/IntegrationPreference/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tasomaniac%2FIntegrationPreference/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264375538,"owners_count":23598394,"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-11-20T05:32:39.576Z","updated_at":"2025-07-09T01:33:19.373Z","avatar_url":"https://github.com/tasomaniac.png","language":"Java","funding_links":[],"categories":["Libs"],"sub_categories":["\u003cA NAME=\"Widget\"\u003e\u003c/A\u003eWidget"],"readme":"IntegrationPreference\n=====================\n\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-IntegrationPreference-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/2741)\n[![Build Status](https://travis-ci.org/tasomaniac/IntegrationPreference.png?branch=master)](https://travis-ci.org/tasomaniac/IntegrationPreference)\n[![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)\n\nThis library is especially for extension apps developers. Some applications like (Muzei, Series Guide)\nhas extension capabilities. You can use their SDK to integrate your app into theirs. Or your app may\n need another app to be installed on the device.\n\n Those can be rare cases but this library is just for you.\n\nYou put `IntegrationPreference` into your preference XML file and it checks the given `Intent` inside its XML tags.\nIf it cannot find the application to handle that `Intent`, it opens Play Store on click to install the\nrequired application.\n\n![](screenshot1.png)\n\nUsage\n-----\n\nDetailed usage can be found in the sample project and in the following applications.\n\n- https://github.com/tasomaniac/MuzeiEarthView\n- https://github.com/tasomaniac/MuzeiTVShows\n- https://github.com/tasomaniac/hackdash\n- https://github.com/tasomaniac/MuzeiComicsCovers\n\nFor the basic usage, you need to add `IntegrationPreference` into your preference xml like below.\n\n```xml\n    \u003ccom.tasomaniac.android.widget.IntegrationPreference\n      android:title=\"Preference Title\"\n      android:key=\"pref_key\"\n      android:summaryOff=\"Description to shown when the Intent is found.\"\n      android:summaryOn=\"Click here to install the required app.\"\u003e\n\n      \u003cintent\n        android:targetClass=\"com.google.android.apps.muzei.settings.SettingsActivity\"\n        android:targetPackage=\"net.nurik.roman.muzei\"/\u003e\n\n    \u003c/com.tasomaniac.android.widget.IntegrationPreference\u003e\n```\n\nAnd in your `PreferenceFragment` or `PreferenceActivity` you can add these to functions into you `onResume` and\n`onPause` methods to enable automatic detecting of application installs.\n\n```java\n\n    @Override\n    protected void onResume() {\n        super.onResume();\n\n        integrationPreference.resume();\n    }\n\n    @Override\n    protected void onPause() {\n        super.onPause();\n\n        integrationPreference.pause();\n    }\n```\n\nFor other configurations and manual Intent handling, please refer to the sample project.\n\nDownload\n--------\n\nDependency for native `PreferenceActivity` and `PreferenceFragment`\n\n```groovy\ncompile 'com.tasomaniac:integrationpreference:0.2'\n```\n\nDependency for support versions.\n\n```groovy\ncompile 'com.tasomaniac:integrationpreference-support:0.2'\n```\n\nSnapshots of the development version are available in [Sonatype's `snapshots` repository][snap].\n\nLicense\n-------\n\n    Copyright (C) 2015 Said Tahsin Dane\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.\n\n\n\n [snap]: https://oss.sonatype.org/content/repositories/snapshots/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasomaniac%2FIntegrationPreference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftasomaniac%2FIntegrationPreference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftasomaniac%2FIntegrationPreference/lists"}