mirror of
https://github.com/ethauvin/android-about-box.git
synced 2025-04-24 18:27:11 -07:00
Prepend sharing message to the URL
This commit is contained in:
parent
51d0b9fcbb
commit
b577541efa
2 changed files with 5 additions and 4 deletions
|
@ -106,6 +106,7 @@ By default, the default Android share intent will be called with the values spec
|
|||
aboutConfig.shareMessage = getString(R.string.share_message);
|
||||
aboutConfig.sharingTitle = getString(R.string.sharing_title);
|
||||
```
|
||||
The `share_message` string will have an app store URL appended to it (appropriately constructed for Google Play or Amazon).
|
||||
|
||||
Alternatively, you can provide a custom sharing function (and omit `shareMessage` and `sharingTitle`):
|
||||
```java
|
||||
|
|
|
@ -25,10 +25,10 @@ public final class ShareUtil {
|
|||
if (!TextUtils.isEmpty(config.packageName) && !TextUtils.isEmpty(shareMessage) && config.buildType != null) {
|
||||
switch (config.buildType) {
|
||||
case GOOGLE:
|
||||
shareMessage = AboutBoxUtils.playStoreAppURI + config.packageName;
|
||||
shareMessage = shareMessage + AboutBoxUtils.playStoreAppURI + config.packageName;
|
||||
break;
|
||||
case AMAZON:
|
||||
shareMessage = AboutBoxUtils.amznStoreAppURI + config.packageName;
|
||||
shareMessage = shareMessage + AboutBoxUtils.amznStoreAppURI + config.packageName;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue