https://github.com/tasomaniac/IntegrationPreference
Preference subclass that goes into your PreferenceFragment.
https://github.com/tasomaniac/IntegrationPreference
Last synced: 5 months ago
JSON representation
Preference subclass that goes into your PreferenceFragment.
- Host: GitHub
- URL: https://github.com/tasomaniac/IntegrationPreference
- Owner: tasomaniac
- License: apache-2.0
- Created: 2015-10-14T18:47:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T13:45:12.000Z (over 6 years ago)
- Last Synced: 2024-11-12T21:08:27.378Z (5 months ago)
- Language: Java
- Size: 290 KB
- Stars: 13
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android-ui - https://github.com/tasomaniac/IntegrationPreference
- awesome-android-ui - https://github.com/tasomaniac/IntegrationPreference
README
IntegrationPreference
=====================[](http://android-arsenal.com/details/1/2741)
[](https://travis-ci.org/tasomaniac/IntegrationPreference)
[](http://www.apache.org/licenses/LICENSE-2.0.html)This library is especially for extension apps developers. Some applications like (Muzei, Series Guide)
has extension capabilities. You can use their SDK to integrate your app into theirs. Or your app may
need another app to be installed on the device.Those can be rare cases but this library is just for you.
You put `IntegrationPreference` into your preference XML file and it checks the given `Intent` inside its XML tags.
If it cannot find the application to handle that `Intent`, it opens Play Store on click to install the
required application.
Usage
-----Detailed usage can be found in the sample project and in the following applications.
- https://github.com/tasomaniac/MuzeiEarthView
- https://github.com/tasomaniac/MuzeiTVShows
- https://github.com/tasomaniac/hackdash
- https://github.com/tasomaniac/MuzeiComicsCoversFor the basic usage, you need to add `IntegrationPreference` into your preference xml like below.
```xml
```And in your `PreferenceFragment` or `PreferenceActivity` you can add these to functions into you `onResume` and
`onPause` methods to enable automatic detecting of application installs.```java
@Override
protected void onResume() {
super.onResume();integrationPreference.resume();
}@Override
protected void onPause() {
super.onPause();integrationPreference.pause();
}
```For other configurations and manual Intent handling, please refer to the sample project.
Download
--------Dependency for native `PreferenceActivity` and `PreferenceFragment`
```groovy
compile 'com.tasomaniac:integrationpreference:0.2'
```Dependency for support versions.
```groovy
compile 'com.tasomaniac:integrationpreference-support:0.2'
```Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
License
-------Copyright (C) 2015 Said Tahsin Dane
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.[snap]: https://oss.sonatype.org/content/repositories/snapshots/