IntegrationPreference Library

You put IntegrationPreference into your preference XML file and it checks the given intent to it. If it cannot find the application to handle that Intent, it opens Play Store on click to install the required application.

License

License

GroupId

GroupId

com.tasomaniac
ArtifactId

ArtifactId

integrationpreference
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

aar
Description

Description

IntegrationPreference Library
You put IntegrationPreference into your preference XML file and it checks the given intent to it. If it cannot find the application to handle that Intent, it opens Play Store on click to install the required application.
Project URL

Project URL

https://github.com/tasomaniac/IntegrationPreference
Source Code Management

Source Code Management

https://github.com/tasomaniac/IntegrationPreference

Download integrationpreference

How to add to project

<!-- https://jarcasting.com/artifacts/com.tasomaniac/integrationpreference/ -->
<dependency>
    <groupId>com.tasomaniac</groupId>
    <artifactId>integrationpreference</artifactId>
    <version>0.2</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.tasomaniac/integrationpreference/
implementation 'com.tasomaniac:integrationpreference:0.2'
// https://jarcasting.com/artifacts/com.tasomaniac/integrationpreference/
implementation ("com.tasomaniac:integrationpreference:0.2")
'com.tasomaniac:integrationpreference:aar:0.2'
<dependency org="com.tasomaniac" name="integrationpreference" rev="0.2">
  <artifact name="integrationpreference" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.tasomaniac', module='integrationpreference', version='0.2')
)
libraryDependencies += "com.tasomaniac" % "integrationpreference" % "0.2"
[com.tasomaniac/integrationpreference "0.2"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

IntegrationPreference

Android Arsenal Build Status License

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.

For the basic usage, you need to add IntegrationPreference into your preference xml like below.

    <com.tasomaniac.android.widget.IntegrationPreference
      android:title="Preference Title"
      android:key="pref_key"
      android:summaryOff="Description to shown when the Intent is found."
      android:summaryOn="Click here to install the required app.">

      <intent
        android:targetClass="com.google.android.apps.muzei.settings.SettingsActivity"
        android:targetPackage="net.nurik.roman.muzei"/>

    </com.tasomaniac.android.widget.IntegrationPreference>

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.

    @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

compile 'com.tasomaniac:integrationpreference:0.2'

Dependency for support versions.

compile 'com.tasomaniac:integrationpreference-support:0.2'

Snapshots of the development version are available in Sonatype's snapshots repository.

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 at

   http://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.

Versions

Version
0.2
0.1