ShareTarget
  
Provide backwards compatibility for using shortcuts as direct share targets.
Latest Update Stable Release Release Candidate Beta Release Alpha Release
October 5, 2022 1.2.0 - - -

Declaring dependencies

To add a dependency on ShareTarget, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.sharetarget:sharetarget:1.2.0"
}

Kotlin

dependencies {
    implementation("androidx.sharetarget:sharetarget:1.2.0")
}

For more information about dependencies, see Add Build Dependencies.

Feedback

Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

Create a new issue

See the Issue Tracker documentation for more information.

Version 1.2.0

Version 1.2.0

October 5, 2022

androidx.sharetarget:sharetarget:1.2.0 is released. Version 1.2.0 contains these commits.

Major changes since 1.1.0

  • Fix required explicit value for android:exported attribute for Android 12 (aosp/1742473)

Version 1.2.0-rc02

July 27, 2022

androidx.sharetarget:sharetarget:1.2.0-rc02 is released with no changes since version 1.2.0-alpha01 . Version 1.2.0-rc02 contains these commits.

Version 1.2.0-rc01

November 3, 2021

androidx.sharetarget:sharetarget:1.2.0-rc01 is released with no changes. Version 1.2.0-rc01 contains these commits.

Version 1.2.0-beta01

September 1, 2021

androidx.sharetarget:sharetarget:1.2.0-beta01 is released. Version 1.2.0-beta01 contains these commits.

Version 1.2.0-alpha01

August 4, 2021

androidx.sharetarget:sharetarget:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits.

Bug Fixes

  • Share target service explicit value for android:exported attribute fix for Android 12. (aosp/1742473)

Version 1.1.0

Version 1.1.0

January 13, 2021

androidx.sharetarget:sharetarget:1.1.0 is released. Version 1.1.0 contains these commits.

Major changes since 1.0.0

  • 1.1.0 uses ShortcutInfoCompat#Rank to set the score of ChooserTargets in compatibility mode. (aosp/1115363)
  • Fixed a resource leak. (aosp/1259160)
  • Errorprone warnings are now enforced. (aosp/1199825)

Version 1.1.0-rc01

December 2, 2020

androidx.sharetarget:sharetarget:1.1.0-rc01 is released with no changes since 1.1.0-beta01. Version 1.1.0-rc01 contains these commits.

Version 1.1.0-beta01

October 14, 2020

androidx.sharetarget:sharetarget:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits.

Bug fixes

Version 1.0.0

Version 1.0.0

May 14, 2020

androidx.sharetarget:sharetarget:1.0.0 is released. Version 1.0.0 contains these commits.

Major features of 1.0.0

ShareTarget module provides backward compatibility for providing share targets which are shown in the platform's ShareSheet. This module does not have any public APIs, and apps do not need to directly interact with this module. Instead, ShortcutManagerCompat internally uses this as a utility library when needed. For more information on how to use the ShareTarget module, please refer to the Providing Direct Share targets guide.

Version 1.0.0-rc01

December 4, 2019

androidx.sharetarget:sharetarget:1.0.0-rc01 is released with no changes since 1.0.0-beta02. Version 1.0.0-rc01 contains these commits.

Version 1.0.0-beta02

November 7, 2019

androidx.sharetarget:sharetarget:1.0.0-beta02 is released. Version 1.0.0-beta02 contains these commits.

Bug fixes

  • When converting ShortcutInfos to ChooserTargets for backwards compatibility, sort shortcuts based on the given rank.

Version 1.0.0-beta01

September 5, 2019

androidx.sharetarget:sharetarget:1.0.0-beta01 is released with no changes since 1.0.0-alpha02. The commits included in this version can be found here.

Version 1.0.0-alpha02

June 5, 2019

androidx.sharetarget:sharetarget:1.0.0-alpha02 is released. The commits included in this version can be found here.

Bug fixes

  • Read the shortcuts resource name from manifest instead of hardcoded name (b/130500127)

Version 1.0.0-alpha01

March 13, 2019

androidx.sharetarget:sharetarget:1.0.0-alpha01 is released.

This module provides backwards compatibility for publishing direct share targets on pre-Q Android versions. None of the APIs in this module are meant to be used directly by the app, but when imported as a dependency, will add extra background functionality to ShortcutManagerCompat in the androidx.core module.

The full list of commits included in this initial release can be found here.

Please file bugs and feature requests under the ShareTarger Issue Tracker.

New features

  • This is the first release of this module.